Skip to content

Commit

Permalink
modified the logs (#306)
Browse files Browse the repository at this point in the history
  • Loading branch information
sssash18 authored May 17, 2024
1 parent a722253 commit 9688720
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 1 deletion.
3 changes: 3 additions & 0 deletions cluster-autoscaler/core/scaledown/eligibility/eligibility.go
Original file line number Diff line number Diff line change
Expand Up @@ -155,6 +155,9 @@ func (c *Checker) unremovableReasonAndNodeUtilization(context *context.Autoscali
return simulator.NotUnderutilized, &utilInfo
}

// FORK-CHANGE: log added to identify underutilized nodes
klog.V(2).Infof("Node %s is underutilized: %s requested (%.6g%% of allocatable) is below the scale-down utilization threshold", node.Name, utilInfo.ResourceName, utilInfo.Utilization*100)

klogx.V(4).UpTo(utilLogsQuota).Infof("Node %s - %s utilization %f", node.Name, utilInfo.ResourceName, utilInfo.Utilization)

return simulator.NoReason, &utilInfo
Expand Down
3 changes: 2 additions & 1 deletion cluster-autoscaler/simulator/scheduling/hinting_simulator.go
Original file line number Diff line number Diff line change
Expand Up @@ -75,7 +75,8 @@ func (s *HintingSimulator) TrySchedulePods(clusterSnapshot clustersnapshot.Clust
}

if nodeName != "" {
klogx.V(4).UpTo(loggingQuota).Infof("Pod %s/%s can be moved to %s", pod.Namespace, pod.Name, nodeName)
// FORK-CHANGE: log level changed to 2 for better debugging.
klogx.V(2).UpTo(loggingQuota).Infof("Pod %s/%s can be moved to %s", pod.Namespace, pod.Name, nodeName)
if err := clusterSnapshot.AddPod(pod, nodeName); err != nil {
return nil, 0, fmt.Errorf("simulating scheduling of %s/%s to %s return error; %v", pod.Namespace, pod.Name, nodeName, err)
}
Expand Down

0 comments on commit 9688720

Please sign in to comment.