From 1490d51028b2330e332b5e3fb2f8539bfad323c4 Mon Sep 17 00:00:00 2001 From: Jan Safranek Date: Fri, 29 Jul 2022 10:35:36 +0200 Subject: [PATCH] Remove noisy log The error would be logged every reconciler sync (100 ms). --- pkg/kubelet/volumemanager/cache/actual_state_of_world.go | 4 ---- pkg/kubelet/volumemanager/reconciler/reconciler.go | 2 +- 2 files changed, 1 insertion(+), 5 deletions(-) diff --git a/pkg/kubelet/volumemanager/cache/actual_state_of_world.go b/pkg/kubelet/volumemanager/cache/actual_state_of_world.go index 241f122d883..4b84c5f9f48 100644 --- a/pkg/kubelet/volumemanager/cache/actual_state_of_world.go +++ b/pkg/kubelet/volumemanager/cache/actual_state_of_world.go @@ -824,10 +824,6 @@ func (asw *actualStateOfWorld) PodExistsInVolume(podName volumetypes.UniquePodNa fullErr := newSELinuxMountMismatchError(volumeName) if util.IsRWOP(volumeObj.spec) { return false, volumeObj.devicePath, fullErr - } else { - // This is not an error yet, but it will be when support for RWO and RWX volumes is added - // TODO: bump some metric here - klog.V(4).ErrorS(fullErr, "Please report this error in https://github.com/kubernetes/enhancements/issues/1710, together with full Pod yaml file") } } } diff --git a/pkg/kubelet/volumemanager/reconciler/reconciler.go b/pkg/kubelet/volumemanager/reconciler/reconciler.go index 9ea0e961f40..35c14a54c8e 100644 --- a/pkg/kubelet/volumemanager/reconciler/reconciler.go +++ b/pkg/kubelet/volumemanager/reconciler/reconciler.go @@ -221,7 +221,7 @@ func (rc *reconciler) mountOrAttachVolumes() { volumeToMount.DevicePath = devicePath if cache.IsSELinuxMountMismatchError(err) { // TODO: check error message + lower frequency, this can be noisy - klog.ErrorS(err, volumeToMount.GenerateErrorDetailed("mount precondition failed", err).Error(), "pod", klog.KObj(volumeToMount.Pod)) + klog.ErrorS(err, volumeToMount.GenerateErrorDetailed("mount precondition failed, please report this error in https://github.com/kubernetes/enhancements/issues/1710, together with full Pod yaml file", err).Error(), "pod", klog.KObj(volumeToMount.Pod)) // TODO: report error better, this may be too noisy rc.desiredStateOfWorld.AddErrorToPod(volumeToMount.PodName, err.Error()) } else if cache.IsVolumeNotAttachedError(err) {