diff --git a/cluster-autoscaler/core/scaledown/actuation/group_deletion_scheduler.go b/cluster-autoscaler/core/scaledown/actuation/group_deletion_scheduler.go index e8aa9676932e..ed6582fce133 100644 --- a/cluster-autoscaler/core/scaledown/actuation/group_deletion_scheduler.go +++ b/cluster-autoscaler/core/scaledown/actuation/group_deletion_scheduler.go @@ -89,8 +89,18 @@ func (ds *GroupDeletionScheduler) ScheduleDeletion(nodeInfo *framework.NodeInfo, nodeDeleteResult := ds.prepareNodeForDeletion(nodeInfo, drain) if nodeDeleteResult.Err != nil { - ds.AbortNodeDeletion(nodeInfo.Node(), nodeGroup.Id(), drain, "prepareNodeForDeletion failed", nodeDeleteResult) - return + isTimeout := true + for _, podEvictionResult := range nodeDeleteResult.PodEvictionResults { + // If there is any error message, it means it is not a pure timeout and node deletion is aborted. + if podEvictionResult.Err != nil { + isTimeout = false + break + } + } + if !isTimeout { + ds.AbortNodeDeletion(nodeInfo.Node(), nodeGroup.Id(), drain, "prepareNodeForDeletion failed", nodeDeleteResult) + return + } } ds.addToBatcher(nodeInfo, nodeGroup, batchSize, drain, opts.ZeroOrMaxNodeScaling)