seaweedfs-csi-driver icon indicating copy to clipboard operation
seaweedfs-csi-driver copied to clipboard

CSI driver doesn't log any errors

Open optix2000 opened this issue 4 years ago • 9 comments

Debugging the CSI driver is annoying as it doesn't log anything on failure (or success). This can be trivially be tested by:

  1. Running kubectl apply -f https://github.com/seaweedfs/seaweedfs-csi-driver/blob/master/deploy/kubernetes/seaweedfs-csi.yaml with a bogus SEAWEEDFS_FILER value. (or make sure that seaweedfs isn't accessible on the default value of 192.168.2.7:8888. 2.kubectl apply -f https://raw.githubusercontent.com/seaweedfs/seaweedfs-csi-driver/master/deploy/kubernetes/sample-seaweedfs-pvc.yaml to trigger a pv provision. 3 Checking logs by running kubectl -n kube-system logs statefulset/csi-seaweedfs-controller seaweedfs-csi-plugin and kubectl -n kube-system logs daemonset/csi-seaweedfs-node csi-seaweedfs-plugin

This results in absolutely no logs signifying there is something wrong, aside from the pvc pending forever and the csi-provisioner throwing timeouts.

# ping 192.168.2.7
PING 192.168.2.7 (192.168.2.7) 56(84) bytes of data.
^C
--- 192.168.2.7 ping statistics ---
1 packets transmitted, 0 received, 100% packet loss, time 0ms
# kubectl -n kube-system logs statefulset/csi-seaweedfs-controller seaweedfs-csi-plugin
I0215 09:40:19     1 main.go:34] connect to filer 192.168.2.7:8888
I0215 09:40:19     1 driver.go:45] Driver: seaweedfs-csi-driver version: 1.0.0
I0215 09:40:19     1 driver.go:91] Enabling volume access mode: SINGLE_NODE_WRITER
I0215 09:40:19     1 driver.go:91] Enabling volume access mode: MULTI_NODE_MULTI_WRITER
I0215 09:40:19     1 driver.go:102] Enabling controller service capability: CREATE_DELETE_VOLUME
I0215 09:40:19     1 driver.go:102] Enabling controller service capability: PUBLISH_UNPUBLISH_VOLUME
I0215 09:40:19     1 server.go:92] Listening for connections on address: &net.UnixAddr{Name:"//var/lib/csi/sockets/pluginproxy/csi.sock", Net:"unix"}
# kubectl -n kube-system logs daemonset/csi-seaweedfs-node csi-seaweedfs-plugin
I0215 09:40:19     1 main.go:34] connect to filer 192.168.2.7:8888
I0215 09:40:19     1 driver.go:45] Driver: seaweedfs-csi-driver version: 1.0.0
I0215 09:40:19     1 driver.go:91] Enabling volume access mode: SINGLE_NODE_WRITER
I0215 09:40:19     1 driver.go:91] Enabling volume access mode: MULTI_NODE_MULTI_WRITER
I0215 09:40:19     1 driver.go:102] Enabling controller service capability: CREATE_DELETE_VOLUME
I0215 09:40:19     1 driver.go:102] Enabling controller service capability: PUBLISH_UNPUBLISH_VOLUME
I0215 09:40:19     1 server.go:92] Listening for connections on address: &net.UnixAddr{Name:"//csi/csi.sock", Net:"unix"}

This can speed up debugging issues like #10, #7, https://github.com/seaweedfs/seaweedfs-csi-driver/pull/8#issuecomment-758262143 or any other connectivity issues.

optix2000 avatar Feb 15 '21 09:02 optix2000

Please let me know how to add additional logs. A PR is welcome.

chrislusf avatar Feb 15 '21 10:02 chrislusf

There was a mistake in the names of the driver, try the chart

ustuzhanin avatar Feb 16 '21 19:02 ustuzhanin

https://github.com/seaweedfs/seaweedfs-csi-driver/tree/master/deploy/helm/seaweedfs-csi-driver

ustuzhanin avatar Feb 16 '21 19:02 ustuzhanin

https://github.com/seaweedfs/seaweedfs-csi-driver/tree/master/deploy/helm/seaweedfs-csi-driver

@ustuzhanin you can also add the instructions on how to apply the helm charts to the project's README.md

chrislusf avatar Feb 16 '21 20:02 chrislusf

ok, in week do it

ustuzhanin avatar Feb 16 '21 20:02 ustuzhanin

but for better use - need upload chart in anyone helm repo. we use private nexus. How in there - dont now. Need research

ustuzhanin avatar Feb 16 '21 20:02 ustuzhanin

but for better use - need upload chart in anyone helm repo. we use private nexus. How in there - dont now. Need research

You can publish a helm chart through GitHub pages: https://github.com/helm/chart-releaser

unixfox avatar Feb 16 '21 20:02 unixfox

ok, read. Now: https://github.com/seaweedfs/seaweedfs-csi-driver/pull/16

ustuzhanin avatar Feb 16 '21 20:02 ustuzhanin

Hi Guys, is the Seaweedfs CSI driver logging now? I see this issue is still open...

We are trying to troubleshoot an issue, but we don't seem to be able to come across any logs from the driver. I am talking about the log from this seaweedfs-csi-driver process that, as you can see, produces a lot of defunct weed processes.

$ sudo ps -Afw --forest | grep weed
root     15740 15647  0 Jul03 ?        00:00:14              |   \_ /csi-node-driver-registrar --v=5 --csi-address=/csi/csi.sock --kubelet-registration-path=/var/lib/kubelet/plugins/seaweedfs-csi-driver/csi.sock
root     16251 16195  0 Jul03 ?        00:00:26              |   \_ /seaweedfs-csi-driver --endpoint=unix:///csi/csi.sock --filer=127.0.0.1:5555 --nodeid=e10ccwe080c000001127
root     16996 16251  0 Jul04 ?        00:00:00              |       \_ [weed] <defunct>
root     17307 16251  0 Jul04 ?        00:00:00              |       \_ [weed] <defunct>
root     17670 16251  0 Jul04 ?        00:00:00              |       \_ [weed] <defunct>
root     18039 16251  0 Jul04 ?        00:00:00              |       \_ [weed] <defunct>
root     18421 16251  0 Jul04 ?        00:00:00              |       \_ [weed] <defunct>
root     18965 16251  0 Jul04 ?        00:00:00              |       \_ [weed] <defunct>
root     19737 16251  0 Jul04 ?        00:00:00              |       \_ [weed] <defunct>
root     20998 16251  0 Jul04 ?        00:00:00              |       \_ [weed] <defunct>
root     23119 16251  0 Jul04 ?        00:00:00              |       \_ [weed] <defunct>
root     26735 16251  0 Jul04 ?        00:00:00              |       \_ [weed] <defunct>
root     30355 16251  0 Jul04 ?        00:00:00              |       \_ [weed] <defunct>
root      1535 16251  0 Jul04 ?        00:00:00              |       \_ [weed] <defunct>

If it does log, where does it log to exactly?

Thanks!

nicned avatar Jul 05 '22 13:07 nicned