From 1f341ee7b5d38a36b91f225a740a77529d373d26 Mon Sep 17 00:00:00 2001 From: Patrick Ohly Date: Thu, 20 Jan 2022 12:00:20 +0100 Subject: [PATCH] kube-scheduler: downgrade namespace log message from "error" to "info" GetNamespaceLabelsSnapshot has a fallback when it gets errors when looking up a namespace, therefore reporting the error is more informational than a real error. In particular, not finding the namespace is normal when running test/integration/scheduler_perf and happens so frequently that there is a lot of output on stderr: E0120 12:19:09.204768 95305 plugin.go:138] "getting namespace, assuming empty set of namespace labels" err="namespace \"namespace-1\" not found" namespace="namespace-1" --- pkg/scheduler/framework/plugins/interpodaffinity/plugin.go | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/pkg/scheduler/framework/plugins/interpodaffinity/plugin.go b/pkg/scheduler/framework/plugins/interpodaffinity/plugin.go index da6b35b5e68..d9d3e5a94da 100644 --- a/pkg/scheduler/framework/plugins/interpodaffinity/plugin.go +++ b/pkg/scheduler/framework/plugins/interpodaffinity/plugin.go @@ -135,6 +135,6 @@ func GetNamespaceLabelsSnapshot(ns string, nsLister listersv1.NamespaceLister) ( // Create and return snapshot of the labels. return labels.Merge(podNS.Labels, nil) } - klog.ErrorS(err, "getting namespace, assuming empty set of namespace labels", "namespace", ns) + klog.V(3).InfoS("getting namespace, assuming empty set of namespace labels", "namespace", ns, "err", err) return }