Skip to content

Commit

Permalink
Do not wait for inactive pods during scale down
Browse files Browse the repository at this point in the history
  • Loading branch information
jkaniuk committed Apr 26, 2021
1 parent 05b63b3 commit dfbc01a
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion clusterloader2/pkg/measurement/util/wait_for_pods.go
Original file line number Diff line number Diff line change
Expand Up @@ -99,7 +99,7 @@ func WaitForPods(clientSet clientset.Interface, stopCh <-chan struct{}, options
}
// When using preemptibles on large scale, number of ready nodes is not stable and reaching DesiredPodCount could take a very long time.
// Overall number of pods (especially Inactive pods) should not grow unchecked.
if options.CountErrorMargin > 0 && podsStatus.RunningUpdated >= desiredPodCount-options.CountErrorMargin && len(pods) <= desiredPodCount {
if options.CountErrorMargin > 0 && podsStatus.RunningUpdated >= desiredPodCount-options.CountErrorMargin && len(pods)-podsStatus.Inactive <= desiredPodCount && podsStatus.Inactive <= options.CountErrorMargin {
return nil
}
oldPods = pods
Expand Down

0 comments on commit dfbc01a

Please sign in to comment.