From 7f50e54719aeef409cfdc2cbdd1cb9e9a5432e63 Mon Sep 17 00:00:00 2001 From: Avesh Agarwal Date: Fri, 11 Aug 2017 15:35:28 -0400 Subject: [PATCH] Print some information. --- pkg/rescheduler/strategies/lownodeutilization.go | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/pkg/rescheduler/strategies/lownodeutilization.go b/pkg/rescheduler/strategies/lownodeutilization.go index 0a5f15ba9..ad9a3c963 100644 --- a/pkg/rescheduler/strategies/lownodeutilization.go +++ b/pkg/rescheduler/strategies/lownodeutilization.go @@ -38,6 +38,7 @@ func LowNodeUtilization(client clientset.Interface, strategy api.ReschedulerStra thresholds := strategy.Params.NodeResourceUtilizationThresholds.Thresholds if thresholds != nil { + fmt.Printf("no resource threshold is configured\n") return } @@ -55,6 +56,7 @@ func LowNodeUtilization(client clientset.Interface, strategy api.ReschedulerStra } if len(lowNodes) == 0 || len(lowNodes) < strategy.Params.NodeResourceUtilizationThresholds.NumberOfNodes { + fmt.Printf("No node is underutilized or number of nodes underutilized is less than NumberOfNodes\n") return } @@ -88,7 +90,6 @@ func IsNodeWithLowUtilization(nodeThresholds api.ResourceThresholds, thresholds } func NodeUtilization(node *v1.Node, pods []*v1.Pod) api.ResourceThresholds { - totalReqs := map[v1.ResourceName]resource.Quantity{} for _, pod := range pods { if podutil.IsBestEffortPod(pod) {