Skip to content

Commit

Permalink
Update csi-debug.md
Browse files Browse the repository at this point in the history
  • Loading branch information
andyzhangx authored Aug 21, 2022
1 parent 4bf4da0 commit f88e2df
Showing 1 changed file with 6 additions and 4 deletions.
10 changes: 6 additions & 4 deletions docs/csi-debug.md
Original file line number Diff line number Diff line change
@@ -1,18 +1,19 @@
## CSI driver debug tips

### case#1: volume create/delete failed
- locate csi driver pod
> There could be multiple controller pods (only one pod is the leader), if there are no helpful logs, try to get logs from the leader controller pod.
- find csi driver controller pod
```console
$ kubectl get pod -o wide -n kube-system | grep csi-nfs-controller
NAME READY STATUS RESTARTS AGE IP NODE
csi-nfs-controller-56bfddd689-dh5tk 5/5 Running 0 35s 10.240.0.19 k8s-agentpool-22533604-0
csi-nfs-controller-56bfddd689-sl4ll 5/5 Running 0 35s 10.240.0.23 k8s-agentpool-22533604-1
```
- get csi driver logs
- get pod description and logs
```console
$ kubectl describe csi-nfs-controller-56bfddd689-dh5tk -n kube-system > csi-nfs-controller-description.log
$ kubectl logs csi-nfs-controller-56bfddd689-dh5tk -c nfs -n kube-system > csi-nfs-controller.log
```
> note: there could be multiple controller pods, if there are no helpful logs, try to get logs from other controller pods

### case#2: volume mount/unmount failed
- locate csi driver pod that does the actual volume mount/unmount
Expand All @@ -24,8 +25,9 @@ csi-nfs-node-cvgbs 3/3 Running 0 7m4s 1
csi-nfs-node-dr4s4 3/3 Running 0 7m4s 10.240.0.4 k8s-agentpool-22533604-0
```

- get csi driver logs
- get pod description and logs
```console
$ kubectl describe po csi-nfs-node-cvgbs -n kube-system > csi-nfs-node-description.log
$ kubectl logs csi-nfs-node-cvgbs -c nfs -n kube-system > csi-nfs-node.log
```

Expand Down

0 comments on commit f88e2df

Please sign in to comment.