Skip to content

Commit dd9d7c6

Browse files
gbartolinimnencia
authored andcommitted
docs: review continued
Signed-off-by: Gabriele Bartolini <[email protected]>
1 parent 85f9ded commit dd9d7c6

File tree

1 file changed

+60
-49
lines changed

1 file changed

+60
-49
lines changed

web/docs/troubleshooting.md

Lines changed: 60 additions & 49 deletions
Original file line numberDiff line numberDiff line change
@@ -178,7 +178,7 @@ When a backup fails, follow these steps in order:
178178
**Solution:**
179179

180180
a. **Check plugin registration status**:
181-
```bash
181+
```sh
182182
# If you have kubectl-cnpg plugin installed (v1.27.0+)
183183
kubectl cnpg status -n <namespace> <cluster-name>
184184
```
@@ -209,7 +209,7 @@ When a backup fails, follow these steps in order:
209209
```
210210
211211
c. **Check plugin deployment is running**:
212-
```bash
212+
```sh
213213
kubectl get deployment -n cnpg-system barman-cloud
214214
```
215215

@@ -219,7 +219,7 @@ When a backup fails, follow these steps in order:
219219

220220
**Solution:**
221221
- Check the sidecar container logs for detailed error messages:
222-
```bash
222+
```sh
223223
kubectl logs -n <namespace> <cluster-pod> -c plugin-barman-cloud
224224
```
225225
- Verify your ObjectStore configuration has all required fields
@@ -231,7 +231,7 @@ When a backup fails, follow these steps in order:
231231
**General debugging steps:**
232232

233233
1. **Check backup status and identify the target instance**
234-
```bash
234+
```sh
235235
# List all backups and their status
236236
kubectl get backups.postgresql.cnpg.io -n <namespace>
237237
@@ -252,7 +252,7 @@ When a backup fails, follow these steps in order:
252252
```
253253

254254
2. **Check sidecar logs on the backup target pod**
255-
```bash
255+
```sh
256256
# First, identify which pod was the backup target (from step 1)
257257
TARGET_POD=$(kubectl get backups.postgresql.cnpg.io -n <namespace> <backup-name> -o jsonpath='{.status.instanceID.podName}')
258258
echo "Backup target pod: $TARGET_POD"
@@ -278,7 +278,7 @@ When a backup fails, follow these steps in order:
278278
```
279279

280280
3. **Check events for backup-related issues**
281-
```bash
281+
```sh
282282
# Check events for the cluster
283283
kubectl get events -n <namespace> --field-selector involvedObject.name=<cluster-name>
284284
@@ -290,7 +290,7 @@ When a backup fails, follow these steps in order:
290290
```
291291

292292
4. **Verify ObjectStore configuration**
293-
```bash
293+
```sh
294294
# Check the ObjectStore resource
295295
kubectl get objectstores.barmancloud.cnpg.io -n <namespace> <objectstore-name> -o yaml
296296
@@ -337,13 +337,13 @@ For Barman-specific features like compression, encryption, and performance tunin
337337
**Plugin-specific debugging:**
338338

339339
1. **Check plugin sidecar logs for WAL archiving errors**
340-
```bash
340+
```sh
341341
# Check recent WAL archive operations in sidecar
342342
kubectl logs -n <namespace> <primary-pod> -c plugin-barman-cloud --tail=50 | grep -i wal
343343
```
344344

345345
2. **Verify the plugin is handling archive_command**
346-
```bash
346+
```sh
347347
# The archive_command should be routing through the plugin
348348
kubectl exec -n <namespace> <primary-pod> -c postgres -- psql -U postgres -c "SHOW archive_command;"
349349
```
@@ -364,7 +364,7 @@ For Barman-specific features like compression, encryption, and performance tunin
364364
**Plugin-specific debugging:**
365365
366366
1. **Check plugin sidecar logs during restore**
367-
```bash
367+
```sh
368368
# Check the sidecar logs on the recovering cluster pods
369369
kubectl logs -n <namespace> <cluster-pod-name> -c plugin-barman-cloud --tail=100
370370
@@ -373,7 +373,7 @@ For Barman-specific features like compression, encryption, and performance tunin
373373
```
374374
375375
2. **Verify plugin can access backups**
376-
```bash
376+
```sh
377377
# Check if ObjectStore is properly configured for restore
378378
kubectl get objectstores.barmancloud.cnpg.io -n <namespace> <objectstore-name> -o yaml
379379
@@ -411,7 +411,7 @@ For detailed Barman restore operations and troubleshooting, refer to the [Barman
411411
```
412412
413413
2. **Check plugin sidecar for WAL access**
414-
```bash
414+
```sh
415415
# Check sidecar logs during recovery for WAL-related errors
416416
kubectl logs -n <namespace> <cluster-pod> -c plugin-barman-cloud | grep -i wal
417417
```
@@ -425,42 +425,44 @@ For detailed PITR configuration and WAL management, see the [Barman PITR documen
425425
#### Plugin cannot connect to object storage
426426
427427
**Symptoms:**
428-
- Plugin sidecar logs show connection errors
428+
429+
- Sidecar logs show connection errors
429430
- Backups fail with authentication or network errors
430-
- ObjectStore resource shows errors
431+
- ObjectStore resource reports errors
432+
431433
432434
**Plugin-specific solutions:**
433435
434-
1. **Verify ObjectStore CRD configuration**
435-
```bash
436+
1. **Verify ObjectStore CRD configuration and secrets**
437+
```sh
436438
# Check ObjectStore resource status
437439
kubectl get objectstores.barmancloud.cnpg.io -n <namespace> <objectstore-name> -o yaml
438440
439441
# Verify the secret exists and has correct keys for your provider
440442
kubectl get secret -n <namespace> <secret-name> -o jsonpath='{.data}' | jq 'keys'
441443
```
442444
443-
2. **Check plugin sidecar connectivity**
444-
```bash
445-
# Check sidecar logs for connection errors
445+
2. **Check sidecar logs for connectivity issues**
446+
```sh
446447
kubectl logs -n <namespace> <cluster-pod> -c plugin-barman-cloud | grep -E "connection|timeout|SSL|certificate"
447448
```
448449
449-
3. **Provider-specific configuration**
450+
3. **Adjust provider-specific settings (endpoint, path style, etc.)**
450451
- See [Object Store Configuration](object_stores.md) for provider-specific settings
451452
- Ensure `endpointURL` and `s3UsePathStyle` match your storage type
452453
- Verify network policies allow egress to your storage provider
453454
454455
## Diagnostic Commands
455456
456-
### Using kubectl-cnpg plugin
457+
### Using the `cnpg` plugin for `kubectl`
457458
458-
The kubectl-cnpg plugin provides enhanced debugging capabilities. Make sure you have it installed and updated:
459+
The `cnpg` plugin for `kubectl` provides extended debugging capabilities.
460+
Keep it updated:
459461
460-
```bash
461-
# Install or update kubectl-cnpg plugin
462+
```sh
463+
# Install or update the `cnpg` plugin
462464
kubectl krew install cnpg
463-
# Or download directly from: https://github.com/cloudnative-pg/cloudnative-pg/releases
465+
# Or using an alternative method: https://cloudnative-pg.io/documentation/current/kubectl-plugin/#install
464466
465467
# Check plugin status (requires CNPG 1.27.0+)
466468
kubectl cnpg status <cluster-name> -n <namespace>
@@ -477,28 +479,32 @@ kubectl cnpg plugin list -n <namespace>
477479
478480
## Getting Help
479481
480-
If you continue to experience issues:
482+
If problems persist:
481483
482484
1. **Check the documentation**
483-
- Review the [Installation Guide](installation.mdx)
484-
- Check [Object Store Configuration](object_stores.md) for provider-specific settings
485-
- Review [Usage Examples](usage.md) for correct configuration patterns
485+
486+
- [Installation Guide](installation.mdx)
487+
- [Object Store Configuration](object_stores.md) (for provider-specific settings)
488+
- [Usage Examples](usage.md)
486489
487490
2. **Gather diagnostic information**
488-
```bash
489-
# Create a diagnostic bundle (⚠️sanitize these before sharing!)
491+
492+
```sh
493+
# Create a diagnostic bundle (⚠️ sanitize these before sharing!)
490494
kubectl get objectstores.barmancloud.cnpg.io -A -o yaml > /tmp/objectstores.yaml
491495
kubectl get clusters.postgresql.cnpg.io -A -o yaml > /tmp/clusters.yaml
492496
kubectl logs -n cnpg-system deployment/barman-cloud --tail=1000 > /tmp/plugin.log
493497
```
494498
495499
3. **Community support**
500+
496501
- CloudNativePG Slack: [#cloudnativepg-users](https://cloud-native.slack.com/messages/cloudnativepg-users)
497502
- GitHub Issues: [plugin-barman-cloud](https://github.com/cloudnative-pg/plugin-barman-cloud/issues)
498503
499-
4. **When reporting issues, include:**
504+
4. **Include when reporting**
505+
500506
- CloudNativePG version
501-
- Barman Cloud Plugin version
507+
- Plugin version
502508
- Kubernetes version
503509
- Cloud provider and region
504510
- Relevant configuration (⚠️sanitize/redact sensitive information)
@@ -509,29 +515,34 @@ If you continue to experience issues:
509515
510516
### Current Known Issues
511517
512-
1. **WAL overwrite protection**: Unlike the in-tree Barman archiver, the plugin doesn't prevent WAL overwrites when multiple clusters share the same name and object store path ([#263](https://github.com/cloudnative-pg/plugin-barman-cloud/issues/263))
513-
2. **Migration compatibility**: After migrating from in-tree backup to the plugin, the `kubectl cnpg backup` command syntax has changed ([#353](https://github.com/cloudnative-pg/plugin-barman-cloud/issues/353)):
514-
```bash
518+
1. **WAL overwrite protection**: Unlike the in-tree Barman archiver, the plugin
519+
doesn't prevent WAL overwrites when multiple clusters share the same name and
520+
object store path
521+
([#263](https://github.com/cloudnative-pg/plugin-barman-cloud/issues/263))
522+
523+
2. **Migration compatibility**: After migrating from in-tree backup to the
524+
plugin, the `kubectl cnpg backup` command syntax has changed
525+
([#353](https://github.com/cloudnative-pg/plugin-barman-cloud/issues/353)):
526+
527+
```sh
515528
# Old command (in-tree, no longer works after migration)
516-
kubectl cnpg backup -n <namespace> <cluster-name> --method=barmanObjectStore
529+
kubectl cnpg backup -n <namespace> <cluster-name> \
530+
--method=barmanObjectStore
517531
518532
# New command (plugin-based)
519-
kubectl cnpg backup -n <namespace> <cluster-name> --method=plugin --plugin-name=barman-cloud.cloudnative-pg.io
533+
kubectl cnpg backup -n <namespace> <cluster-name> \
534+
--method=plugin --plugin-name=barman-cloud.cloudnative-pg.io
520535
```
521536

522537
### Plugin Limitations
523538

524-
1. **Installation method**: Currently only supports manifest and Kustomize installation ([#351](https://github.com/cloudnative-pg/plugin-barman-cloud/issues/351) - Helm chart requested)
525-
2. **Sidecar resource sharing**: The plugin sidecar container shares pod resources with PostgreSQL
526-
3. **Plugin restart behavior**: Restarting the sidecar container requires restarting the entire PostgreSQL pod
539+
1. **Installation method**: Currently only supports manifest and Kustomize
540+
installation ([#351](https://github.com/cloudnative-pg/plugin-barman-cloud/issues/351) -
541+
Helm chart requested)
527542

528-
### Compatibility Matrix
543+
2. **Sidecar resource sharing**: The plugin sidecar container shares pod
544+
resources with PostgreSQL
529545

530-
| Plugin Version | CloudNativePG Version | Kubernetes Version | Notes |
531-
|---------------|----------------------|-------------------|--------|
532-
| 0.6.x | 1.26.x, **1.27.x** (recommended) | 1.28+ | CNPG 1.27.0+ provides enhanced plugin status reporting |
533-
| 0.5.x | 1.25.x, 1.26.x | 1.27+ | Limited plugin diagnostics |
546+
3. **Plugin restart behavior**: Restarting the sidecar container requires
547+
restarting the entire PostgreSQL pod
534548

535-
:::tip
536-
Always check the [Release Notes](https://github.com/cloudnative-pg/plugin-barman-cloud/releases) for version-specific known issues and fixes.
537-
:::

0 commit comments

Comments
 (0)