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

cluster-autoscaler : MaxNodesProcessor is being called before AtomicResizeFilteringProcessor #7342

Closed
abdelrahman882 opened this issue Oct 4, 2024 · 3 comments
Labels
area/cluster-autoscaler kind/bug Categorizes issue or PR as related to a bug.

Comments

@abdelrahman882
Copy link
Contributor

Which component are you using?:
cluster-autoscaler

What version of the component are you using?:
Component version:1.31

What k8s version are you using (kubectl version)?:
v1.30.2

What environment is this in?: GKE

What did you expect to happen?:
MaxNodesProcessor limits the number of nodes to scale down according to the passed maxCount -currently it's being set to math.MaxInt in the planner- we should expect from this processor and AtomicResizeFilteringProcessor to filter as much as possible nodes less than maxCount

What happened instead?:
We call MaxNodesProcessor before AtomicResizeFilteringProcessor which might result in removing candidate nodes from the end that block the AtomicResizeFilteringProcessor from removing other nodes in same node group

How to reproduce it (as minimally and precisely as possible):
1.Set maxCount in planner to low value for example 5
2.Create 2 node groups ng1 and ng2 of size 3 for both
3.Enable ZeroOrMaxNodeScaling for ng1
4.Consider all nodes are removable and put ng2 nodes first in passed candidates
5.MaxNodesProcessor will exclude one node from ng1 to have 5 nodes
6.AtomicResizeFilteringProcessor will exclude the other 2 from from ng1 because of ZeroOrMaxNodeScaling
7. Scale down will happen to only 3 nodes from ng2
8.We could have removed 3 nodes from ng1 and 2 from ng2

Anything else we need to know?:
I suggest calling AtomicResizeFilteringProcessor first and in MaxNodesProcessor we priortize full node groups deletions over single nodes so we can maximize number of nodes to be deleted less than maxCount

@adrianmoisey
Copy link
Member

/area cluster-autoscaler

@x13n
Copy link
Member

x13n commented Oct 29, 2024

#7307 removes MaxNodesProcessor now, so I guess it is safe to close this.

/close

@k8s-ci-robot
Copy link
Contributor

@x13n: Closing this issue.

In response to this:

#7307 removes MaxNodesProcessor now, so I guess it is safe to close this.

/close

Instructions for interacting with me using PR comments are available here. If you have questions or suggestions related to my behavior, please file an issue against the kubernetes-sigs/prow repository.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
area/cluster-autoscaler kind/bug Categorizes issue or PR as related to a bug.
Projects
None yet
Development

No branches or pull requests

4 participants