Skip to content

Commit

Permalink
main: Be more verbose if quitting early from misconfiguration
Browse files Browse the repository at this point in the history
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]>
  • Loading branch information
ebblake committed Jan 16, 2025
1 parent f707028 commit 23cefeb
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions cmd/csi-external-health-monitor-controller/main.go
Original file line number Diff line number Diff line change
Expand Up @@ -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)
}

Expand All @@ -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)
}

Expand Down

0 comments on commit 23cefeb

Please sign in to comment.