From d6ffca04c9293627daa8c34e08774af2dc5ef6fd Mon Sep 17 00:00:00 2001 From: Peter Hunt~ Date: Tue, 16 Aug 2022 16:45:19 -0400 Subject: [PATCH] kubelet/stats: drop makePodStorageStats errors to V(6) and by doing so, fix a bug where the stats providers report a directory is not found after a pod's storage is removed Signed-off-by: Peter Hunt --- pkg/kubelet/stats/helper.go | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/pkg/kubelet/stats/helper.go b/pkg/kubelet/stats/helper.go index ff9ec874dfa..dd968b06eea 100644 --- a/pkg/kubelet/stats/helper.go +++ b/pkg/kubelet/stats/helper.go @@ -431,7 +431,7 @@ func makePodStorageStats(s *statsapi.PodStats, rootFsInfo *cadvisorapiv2.FsInfo, } logStats, err := hostStatsProvider.getPodLogStats(podNs, podName, podUID, rootFsInfo) if err != nil { - klog.ErrorS(err, "Unable to fetch pod log stats", "pod", klog.KRef(podNs, podName)) + klog.V(6).ErrorS(err, "Unable to fetch pod log stats", "pod", klog.KRef(podNs, podName)) // If people do in-place upgrade, there might be pods still using // the old log path. For those pods, no pod log stats is returned. // We should continue generating other stats in that case. @@ -439,7 +439,7 @@ func makePodStorageStats(s *statsapi.PodStats, rootFsInfo *cadvisorapiv2.FsInfo, } etcHostsStats, err := hostStatsProvider.getPodEtcHostsStats(podUID, rootFsInfo) if err != nil { - klog.ErrorS(err, "Unable to fetch pod etc hosts stats", "pod", klog.KRef(podNs, podName)) + klog.V(6).ErrorS(err, "Unable to fetch pod etc hosts stats", "pod", klog.KRef(podNs, podName)) } s.EphemeralStorage = calcEphemeralStorage(s.Containers, ephemeralStats, rootFsInfo, logStats, etcHostsStats, isCRIStatsProvider) }