From d54b73a6baf511b1e72797fbe5acee2dd94e440c Mon Sep 17 00:00:00 2001 From: Shubham Minglani Date: Sat, 25 Nov 2017 19:49:05 +0530 Subject: [PATCH] Add log messages for target, underutilized nodes This commit adds log messages to be printed whenever a node is identified as a target node from which the pods can be evicted or as an underutilized node to which the evicted pods can be scheduled, if at all. This should help with debugging as well as with letting the user know the identified nodes. --- pkg/descheduler/strategies/lownodeutilization.go | 2 ++ 1 file changed, 2 insertions(+) diff --git a/pkg/descheduler/strategies/lownodeutilization.go b/pkg/descheduler/strategies/lownodeutilization.go index bff65efe0..f8ae7db12 100644 --- a/pkg/descheduler/strategies/lownodeutilization.go +++ b/pkg/descheduler/strategies/lownodeutilization.go @@ -115,8 +115,10 @@ func classifyNodes(npm NodePodsMap, thresholds api.ResourceThresholds, targetThr glog.V(1).Infof("Node %#v usage: %#v", node.Name, usage) if IsNodeWithLowUtilization(usage, thresholds) { + glog.V(1).Infof("Identified underutilized node: %v", node.ObjectMeta.Name) lowNodes = append(lowNodes, nuMap) } else if IsNodeAboveTargetUtilization(usage, targetThresholds) { + glog.V(1).Infof("Identified target node: %v", node.ObjectMeta.Name) targetNodes = append(targetNodes, nuMap) } else { // Seems we don't need to collect them?