Skip to content

Commit 0002157

Browse files
committed
nit: when scheduling fails on topology constraints, skip the last node that failed scheduling
Signed-off-by: MenD32 <[email protected]>
1 parent 8fd9e1f commit 0002157

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

cluster-autoscaler/estimator/binpacking_estimator.go

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -190,7 +190,7 @@ func (e *BinpackingNodeEstimator) tryToScheduleOnNewNodes(
190190
// If the pod can't be scheduled on the last node because of topology constraints, we can stop binpacking.
191191
// The pod can't be scheduled on any new node either, because it has the same topology constraints.
192192
nodeName, err := e.clusterSnapshot.SchedulePodOnAnyNodeMatching(pod, func(nodeInfo *framework.NodeInfo) bool {
193-
return true // Node scale-up can cause old nodes to become schedulable, so we check all nodes.
193+
return nodeInfo.Node().Name != estimationState.lastNodeName // only skip the last node that failed scheduling
194194
})
195195
if err != nil && err.Type() == clustersnapshot.SchedulingInternalError {
196196
// Unexpected error.

0 commit comments

Comments
 (0)