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 unneeded node groups regardless of scale down being in cooldown. #5901

Merged
merged 1 commit into from
Jul 4, 2023

Conversation

olagacek
Copy link
Contributor

What type of PR is this?

/kind feature

What this PR does / why we need it:

Currently unneeded node groups are deleted only if scale down isn't in cooldown, so in particular if there was a scale up in a given loop, no unneeded node group will get deleted. There are certain scenarios in which that might turn out problematic - eg if scale up fails in every loop, the node groups won't be deleted for a long time. At the same time, unneeded node groups might affect scale up failures (e.g. quota issues).

Due to that, we can decouple unneeded node group deletion from the rest of scale down logic.

Does this PR introduce a user-facing change?

NONE

Additional documentation e.g., KEPs (Kubernetes Enhancement Proposals), usage docs, etc.:


@k8s-ci-robot k8s-ci-robot added the kind/feature Categorizes issue or PR as related to a new feature. label Jun 28, 2023
@k8s-ci-robot k8s-ci-robot added area/cluster-autoscaler size/S Denotes a PR that changes 10-29 lines, ignoring generated files. labels Jun 28, 2023
@k8s-triage-robot
Copy link

Unknown CLA label state. Rechecking for CLA labels.

Send feedback to sig-contributor-experience at kubernetes/community.

/check-cla
/easycla

@k8s-ci-robot k8s-ci-robot added the cncf-cla: yes Indicates the PR's author has signed the CNCF CLA. label Jun 29, 2023
Copy link
Member

@x13n x13n left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

/assign

Looks good, just one comment.

if err != nil {
klog.Errorf("Error while removing unneeded node groups: %v", err)
}
scaleDownStatus.RemovedNodeGroups = removedNodeGroups
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I think this makes line 653 no-op now.

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I don't think so, as in line 648 we are overwriting scaleDownStatus

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Ah, good point. This function is way too long 😞

@olagacek olagacek requested a review from x13n July 3, 2023 09:51
@x13n
Copy link
Member

x13n commented Jul 4, 2023

/lgtm
/approve

@k8s-ci-robot k8s-ci-robot added the lgtm "Looks good to me", indicates that a PR is ready to be merged. label Jul 4, 2023
@k8s-ci-robot
Copy link
Contributor

[APPROVALNOTIFIER] This PR is APPROVED

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

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 Jul 4, 2023
@k8s-ci-robot k8s-ci-robot merged commit adb16c8 into kubernetes:master Jul 4, 2023
Shubham82 added a commit to Shubham82/autoscaler that referenced this pull request Feb 5, 2024
…of scale down being in cooldown into CA1.26
Shubham82 added a commit to Shubham82/autoscaler that referenced this pull request Feb 5, 2024
…of scale down being in cooldown into CA1.27
k8s-ci-robot added a commit that referenced this pull request Feb 6, 2024
…am-cluster-autoscaler-release-1.26

Backport #5901 [CA] Remove unneeded node groups regardless of scale down being in cooldown into CA1.26
k8s-ci-robot added a commit that referenced this pull request Feb 6, 2024
…am-cluster-autoscaler-release-1.27

Backport #5901 [CA] Remove unneeded node groups regardless of scale down being in cooldown into CA1.27
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. area/cluster-autoscaler 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/S Denotes a PR that changes 10-29 lines, ignoring generated files.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants