From c31b181ce169473884e12145111986a468905957 Mon Sep 17 00:00:00 2001 From: Gabriele Bartolini Date: Sun, 14 Sep 2025 10:34:28 +0200 Subject: [PATCH] docs: more review Signed-off-by: Gabriele Bartolini --- web/docs/troubleshooting.md | 64 +++++++++++++++++++++++++++++-------- 1 file changed, 50 insertions(+), 14 deletions(-) diff --git a/web/docs/troubleshooting.md b/web/docs/troubleshooting.md index f9b6832..b25ff60 100644 --- a/web/docs/troubleshooting.md +++ b/web/docs/troubleshooting.md @@ -104,22 +104,58 @@ kubectl logs -n -c plugin-barman-cloud --previous When a backup fails, follow these steps in order: -1. **Check backup status**: `kubectl get backups.postgresql.cnpg.io -n ` -2. **Get error details and target pod**: - ```bash - kubectl describe backups.postgresql.cnpg.io -n - # Or extract just the target pod name - kubectl get backups.postgresql.cnpg.io -n -o jsonpath='{.status.instanceID.podName}' +1. **Check backup status**: + + ```sh + kubectl get backups.postgresql.cnpg.io -n ``` -3. **Check the specific target pod's sidecar logs**: - ```bash - TARGET_POD=$(kubectl get backups.postgresql.cnpg.io -n -o jsonpath='{.status.instanceID.podName}') - kubectl logs -n $TARGET_POD -c plugin-barman-cloud --tail=100 | grep -E "ERROR|FATAL|panic" +2. **Get error details and target pod**: + + ```sh + kubectl describe backups.postgresql.cnpg.io \ + -n + + kubectl get backups.postgresql.cnpg.io \ + -n \ + -o jsonpath='{.status.instanceID.podName}' + ``` +3. **Check the target pod’s sidecar logs**: + + ```sh + TARGET_POD=$(kubectl get backups.postgresql.cnpg.io \ + -n \ + -o jsonpath='{.status.instanceID.podName}') + + kubectl logs \ + -n $TARGET_POD -c plugin-barman-cloud + --tail=100 | grep -E "ERROR|FATAL|panic" + ``` +4. **Check cluster events**: + + ```sh + kubectl get events -n \ + --field-selector involvedObject.name= \ + --sort-by='.lastTimestamp' + ``` +5. **Verify plugin is running**: + + ```sh + kubectl get pods \ + -n cnpg-system -l app.kubernetes.io/name=barman-cloud + ``` +6. **Check operator logs**: + + ```sh + kubectl logs \ + -n cnpg-system deployment/cnpg-controller-manager \ + --tail=100 | grep -i "backup\|plugin" + ``` +7. **Check plugin manager logs**: + + ```sh + kubectl logs \ + -n cnpg-system deployment/barman-cloud --tail=100 ``` -4. **Check cluster events**: `kubectl get events -n --field-selector involvedObject.name= --sort-by='.lastTimestamp'` -5. **Verify plugin is running**: `kubectl get pods -n cnpg-system -l app.kubernetes.io/name=barman-cloud` -6. **Check operator logs**: `kubectl logs -n cnpg-system deployment/cnpg-controller-manager --tail=100 | grep -i "backup\|plugin"` -7. **Check plugin manager logs**: `kubectl logs -n cnpg-system deployment/barman-cloud --tail=100` #### Backup job fails immediately