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 incorrectly skips nodes with unschedulable field in scheduling simulation #7728

Open
macsko opened this issue Jan 20, 2025 · 0 comments
Labels
area/cluster-autoscaler kind/bug Categorizes issue or PR as related to a bug.

Comments

@macsko
Copy link
Member

macsko commented Jan 20, 2025

Which component are you using?:

/area cluster-autoscaler

What version of the component are you using?:

I found it in the code and it seems to be there for a long time.

Component version:

What k8s version are you using (kubectl version)?:

kubectl version Output
$ kubectl version

What environment is this in?:

What did you expect to happen?:

If there is a pod that tolerates the node.kubernetes.io/unschedulable taint, then it could be schedulable on a node with unschedulable: true.

tolerations:
- key: "node.kubernetes.io/unschedulable"
  operator: "Exists"
  effect: "NoSchedule"

It should be honored by CA's plugin runner.

What happened instead?:

Plugin runner has a shortcut, that checks only the unschedulable field:

// Nodes with the Unschedulable bit set will be rejected by one of the plugins during the Filter phase below. We can check that quickly here
// and short-circuit to avoid running the expensive Filter phase at all in this case.
if nodeInfo.Node().Spec.Unschedulable {
continue
}

Then, if there is such pod with toleration specified above, it won't be taken into consideration by CA.

How to reproduce it (as minimally and precisely as possible):

Anything else we need to know?:

@macsko macsko added the kind/bug Categorizes issue or PR as related to a bug. label Jan 20, 2025
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

2 participants