You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: docs/content/troubleshooting/log_status_collect.md
+8-4Lines changed: 8 additions & 4 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -60,35 +60,39 @@ If the PVCs are not in the _Bound_ state, collect the events of all unbound PVCs
60
60
61
61
#### Log collection for all CSI driver node pods and their containers
62
62
63
-
To collect logs for all CSI driver node pods, use the following commands:
63
+
To collect logs for all CSI driver node pods, use the following commands (collection of 'previous' pod logs may fail if the pods have never restarted):
64
64
65
65
nodepods=`kubectl get pods -n <namespace> -l product=ibm-block-csi-driver -l app.kubernetes.io/component=csi-node --output=jsonpath={.items..metadata.name}`
66
66
67
67
for pod in $nodepods;do for container in `kubectl get -n <namespace> pod $pod -o jsonpath='{.spec.containers[*].name}'`;do kubectl logs -n <namespace> $pod -c $container > logs/${pod}_${container}.log;done;done
68
+
for pod in $nodepods;do for container in `kubectl get -n <namespace> pod $pod -o jsonpath='{.spec.containers[*].name}'`;do kubectl logs --previous -n <namespace> $pod -c $container > logs/${pod}_${container}.previous.log;done;done
68
69
69
70
<br>
70
71
71
72
#### Log collection for all CSI controller containers
72
73
73
-
To collect logs for all controller containers, use the following commands:
74
+
To collect logs for all controller containers, use the following commands (collection of 'previous' pod logs may fail if the pod has never restarted):
74
75
75
76
for container in `kubectl get -n <namespace> pod ibm-block-csi-controller-0 -o jsonpath='{.spec.containers[*].name}'`;do kubectl logs -n <namespace> ibm-block-csi-controller-0 -c $container > logs/ibm-block-csi-controller-0_${container}.log;done
77
+
for container in `kubectl get -n <namespace> pod ibm-block-csi-controller-0 -o jsonpath='{.spec.containers[*].name}'`;do kubectl logs --previous -n <namespace> ibm-block-csi-controller-0 -c $container > logs/ibm-block-csi-controller-0_${container}.previous.log;done
76
78
77
79
<br>
78
80
79
81
#### Log collection for CSI operator logs
80
-
To collect CSI operator logs, use the following commands:
82
+
To collect CSI operator logs, use the following commands (collection of 'previous' pod logs may fail if the pod has never restarted):
81
83
82
84
operatorpod=`kubectl get pods -n <namespace> -l app.kubernetes.io/instance=ibm-block-csi-operator --output=jsonpath='{.items..metadata.name}'`
When a host definer issue occurs, be sure to collect logs from the host definer pod where the error occurred.
91
+
When a host definer issue occurs, be sure to collect logs from the host definer pod where the error occurred, using the following command (collection of 'previous' pod logs may fail if the pods has never restarted):
89
92
90
93
hostdefinerpod=`kubectl get pods -n <namespace> -l app.kubernetes.io/component=hostdefiner --output=jsonpath='{.items..metadata.name}'`
0 commit comments