From 23cefeb3a9501c9ac2d723d0a4430cd5d01baaf5 Mon Sep 17 00:00:00 2001 From: Eric Blake Date: Thu, 16 Jan 2025 12:51:03 -0600 Subject: [PATCH] main: Be more verbose if quitting early from misconfiguration 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: https://github.com/kubernetes-csi/external-health-monitor/issues/305 Signed-off-by: Eric Blake --- cmd/csi-external-health-monitor-controller/main.go | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/cmd/csi-external-health-monitor-controller/main.go b/cmd/csi-external-health-monitor-controller/main.go index 54e91d81..15b73045 100644 --- a/cmd/csi-external-health-monitor-controller/main.go +++ b/cmd/csi-external-health-monitor-controller/main.go @@ -180,7 +180,7 @@ func main() { klog.FlushAndExit(klog.ExitFlushTimeout, 1) } if !supportsService { - logger.V(2).Info("CSI driver does not support Plugin Controller Service, exiting") + logger.Info("CSI driver does not support Plugin Controller Service, exiting") klog.FlushAndExit(klog.ExitFlushTimeout, 1) } @@ -203,7 +203,7 @@ func main() { } if (!supportControllerListVolumes && !supportControllerGetVolume) || !supportControllerVolumeCondition { - logger.V(2).Info("CSI driver does not support Controller ListVolumes and GetVolume service or does not implement VolumeCondition, exiting") + logger.Info("CSI driver does not support Controller ListVolumes and GetVolume service or does not implement VolumeCondition, exiting") klog.FlushAndExit(klog.ExitFlushTimeout, 1) }