Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Logging is too silent by default when CSI driver is misconfigured #305

Open
ebblake opened this issue Jan 16, 2025 · 0 comments · May be fixed by #306
Open

Logging is too silent by default when CSI driver is misconfigured #305

ebblake opened this issue Jan 16, 2025 · 0 comments · May be fixed by #306

Comments

@ebblake
Copy link

ebblake commented Jan 16, 2025

I was trying to add this sidecar to my CSI driver, but my pod was stuck in a CrashLoopBackOff state. kubectl logs mydriverpod -c csi-health-monitor was unhelpful:

$ kubectl logs -n kubesan-system csi-controller-plugin-65776bcb7-68mm8 -c csi-health-monitor
I0116 18:48:15.917448       1 main.go:104] "Version" version="v0.14.0"
I0116 18:48:15.919201       1 common.go:143] "Probing CSI driver for readiness"
$ 

I traced it down to a missing advertisement of csi.ControllerServiceCapability_RPC_LIST_VOLUME_CONDITION in my ControllerGetCapabilities() gRPC call, but it took me adding a --v=2 argument to the command line of the sidecar.

Best practice when failing fast due to misconfiguration is to be verbose about what was misconfigured, rather than hiding it behind V(2), so that the logs can serve as a useful pointer for how to correct the misconfiguration.

ebblake added a commit to ebblake/external-health-monitor that referenced this issue Jan 16, 2025
If the driver lacks support for usefully running the health monitor,
be verbose by default about why we are exiting.  The resulting logs
will be handy in pointing the driver developer what thy might have
done wrong in their CSI implementation, even if they didn't pass in a
non-default --v=2.

Fixes: kubernetes-csi#305
Signed-off-by: Eric Blake <[email protected]>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging a pull request may close this issue.

1 participant