fix(kubelet): convert V().Error() to V().Info() in volumemanager

Apply the same verbosity-aware logging fix to volumemanager components:
- desired_state_of_world.go (2 instances)
- reconciler/reconstruct.go (1 instance)

This completes the kubelet-wide fix for V().Error() ignoring verbosity.

Signed-off-by: thc1006 <84045975+thc1006@users.noreply.github.com>
This commit is contained in:
thc1006
2026-01-06 15:24:07 +00:00
parent 3e9b24cffb
commit e89362f1db
2 changed files with 3 additions and 3 deletions

View File

@@ -670,7 +670,7 @@ func handleSELinuxMetricError(logger klog.Logger, err error, seLinuxSupported bo
// This is not an error yet, but it will be when support for other access modes is added.
warningMetric.Add(1.0)
logger.V(4).Error(err, "Please report this error in https://github.com/kubernetes/enhancements/issues/1710, together with full Pod yaml file")
logger.V(4).Info("Please report this error in https://github.com/kubernetes/enhancements/issues/1710, together with full Pod yaml file", "err", err)
return nil
}
@@ -685,7 +685,7 @@ func getVolumePluginNameWithDriver(logger klog.Logger, plugin volume.VolumePlugi
driverName, err := csi.GetCSIDriverName(spec)
if err != nil {
// In theory this is unreachable - such volume would not pass validation.
logger.V(4).Error(err, "failed to get CSI driver name from volume spec")
logger.V(4).Info("failed to get CSI driver name from volume spec", "err", err)
driverName = "unknown"
}
// `/` is used to separate plugin + CSI driver in util.GetUniqueVolumeName() too

View File

@@ -185,7 +185,7 @@ func (rc *reconciler) updateReconstructedFromNodeStatus(ctx context.Context) {
node, fetchErr := rc.kubeClient.CoreV1().Nodes().Get(ctx, string(rc.nodeName), metav1.GetOptions{})
if fetchErr != nil {
// This may repeat few times per second until kubelet is able to read its own status for the first time.
logger.V(4).Error(fetchErr, "Failed to get Node status to reconstruct device paths")
logger.V(4).Info("Failed to get Node status to reconstruct device paths", "err", fetchErr)
return
}