Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Remove disable scale down callback if schedulable pods are found in filter_out_schedulable. #4661

Merged
merged 1 commit into from
Feb 3, 2022

Conversation

olagacek
Copy link
Contributor

@olagacek olagacek commented Feb 2, 2022

Which component this PR applies to?

cluster-autoscaler

What type of PR is this?

/kind feature

What this PR does / why we need it:

This PR makes it possible for cluster autoscaler to perform scale down on a node group even when there are some schedulable pods that can be fit on other node groups.

Similar change was previously discussed here: #3547 (comment), however in the end it was abandoned.

As currently scale up and scale down use cluster snapshot, scale down is aware that some pods may be scheduled on nodes and it won't remove them.

This was tested in following scenario: there were two node groups, one for workload A, the other for workload B. Shortly after Job A pods finished (triggering scale down), Job B pods started, triggering scale up for node group B. Together with this change and scale down delay after scale up set to 0, there were concurrent scale up and scale down in progress. Scale up and scale down were both successful, so it should be safe to assume this change does not break anything.

@k8s-ci-robot k8s-ci-robot added kind/feature Categorizes issue or PR as related to a new feature. cncf-cla: yes Indicates the PR's author has signed the CNCF CLA. size/XS Denotes a PR that changes 0-9 lines, ignoring generated files. labels Feb 2, 2022
@olagacek
Copy link
Contributor Author

olagacek commented Feb 2, 2022

/assign @x13n

@x13n
Copy link
Member

x13n commented Feb 3, 2022

/lgtm

@k8s-ci-robot k8s-ci-robot added the lgtm "Looks good to me", indicates that a PR is ready to be merged. label Feb 3, 2022
@MaciekPytel
Copy link
Contributor

/approve
We discussed this change quite a bit offline with @olagacek and @x13n, trying to come up with scenarios where it would break or that would require extensive testing, but beside testing scale-up and scale-down happening in parallel (described in PR description) we haven't managed to find any particularly risky scenarios to test.

@k8s-ci-robot
Copy link
Contributor

[APPROVALNOTIFIER] This PR is APPROVED

This pull-request has been approved by: MaciekPytel, olagacek

The full list of commands accepted by this bot can be found here.

The pull request process is described here

Needs approval from an approver in each of these files:

Approvers can indicate their approval by writing /approve in a comment
Approvers can cancel approval by writing /approve cancel in a comment

@k8s-ci-robot k8s-ci-robot added the approved Indicates a PR has been approved by an approver from all required OWNERS files. label Feb 3, 2022
@k8s-ci-robot k8s-ci-robot merged commit 994fbac into kubernetes:master Feb 3, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
approved Indicates a PR has been approved by an approver from all required OWNERS files. cncf-cla: yes Indicates the PR's author has signed the CNCF CLA. kind/feature Categorizes issue or PR as related to a new feature. lgtm "Looks good to me", indicates that a PR is ready to be merged. size/XS Denotes a PR that changes 0-9 lines, ignoring generated files.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants