From 8fae8e54af2f7ca4585808e90aadb22d789a6a46 Mon Sep 17 00:00:00 2001 From: Jacek Kaniuk Date: Mon, 16 Dec 2019 14:31:26 +0100 Subject: [PATCH] Disable excessive logging in scheduler plugins --- .../framework/plugins/interpodaffinity/interpod_affinity.go | 2 +- pkg/scheduler/framework/plugins/nodeports/node_ports.go | 2 +- pkg/scheduler/framework/plugins/noderesources/fit.go | 2 +- .../framework/plugins/podtopologyspread/pod_topology_spread.go | 2 +- 4 files changed, 4 insertions(+), 4 deletions(-) diff --git a/pkg/scheduler/framework/plugins/interpodaffinity/interpod_affinity.go b/pkg/scheduler/framework/plugins/interpodaffinity/interpod_affinity.go index 8060b6092ef..ae986dd57a4 100644 --- a/pkg/scheduler/framework/plugins/interpodaffinity/interpod_affinity.go +++ b/pkg/scheduler/framework/plugins/interpodaffinity/interpod_affinity.go @@ -122,7 +122,7 @@ func getPodAffinityMetadata(cycleState *framework.CycleState) (*predicates.PodAf if err != nil { // The metadata wasn't pre-computed in prefilter. We ignore the error for now since // Filter is able to handle that by computing it again. - klog.Error(err) + klog.V(5).Infof("Error reading %q from cycleState: %v", preFilterStateKey, err) return nil, nil } diff --git a/pkg/scheduler/framework/plugins/nodeports/node_ports.go b/pkg/scheduler/framework/plugins/nodeports/node_ports.go index da44a27f5a0..394983572d3 100644 --- a/pkg/scheduler/framework/plugins/nodeports/node_ports.go +++ b/pkg/scheduler/framework/plugins/nodeports/node_ports.go @@ -79,7 +79,7 @@ func getPreFilterState(cycleState *framework.CycleState) (preFilterState, error) if err != nil { // The metadata wasn't pre-computed in prefilter. We ignore the error for now since // Filter is able to handle that by computing it again. - klog.Error(err) + klog.V(5).Infof("Error reading %q from cycleState: %v", preFilterStateKey, err) return nil, nil } diff --git a/pkg/scheduler/framework/plugins/noderesources/fit.go b/pkg/scheduler/framework/plugins/noderesources/fit.go index 044f064a836..a873e333e8b 100644 --- a/pkg/scheduler/framework/plugins/noderesources/fit.go +++ b/pkg/scheduler/framework/plugins/noderesources/fit.go @@ -89,7 +89,7 @@ func getPodResourceRequest(cycleState *framework.CycleState) (*nodeinfo.Resource if err != nil { // The metadata wasn't pre-computed in prefilter. We ignore the error for now since // Filter is able to handle that by computing it again. - klog.Errorf("reading %q from cycleState: %v", preFilterStateKey, err) + klog.V(5).Infof("Error reading %q from cycleState: %v", preFilterStateKey, err) return nil, nil } diff --git a/pkg/scheduler/framework/plugins/podtopologyspread/pod_topology_spread.go b/pkg/scheduler/framework/plugins/podtopologyspread/pod_topology_spread.go index 5b50ee7e856..c5f3fcf6bf2 100644 --- a/pkg/scheduler/framework/plugins/podtopologyspread/pod_topology_spread.go +++ b/pkg/scheduler/framework/plugins/podtopologyspread/pod_topology_spread.go @@ -123,7 +123,7 @@ func getPodTopologySpreadMetadata(cycleState *framework.CycleState) (*predicates if err != nil { // The metadata wasn't pre-computed in prefilter. We ignore the error for now since // we are able to handle that by computing it again (e.g. in Filter()). - klog.Error(err) + klog.V(5).Infof("Error reading %q from cycleState: %v", preFilterStateKey, err) return nil, nil }