-
Notifications
You must be signed in to change notification settings - Fork 40k
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
Scheduler's default plugin returns an invalid score that is not in the range of [0, 100], resulting in no Pods being scheduled #122066
Comments
This issue is currently awaiting triage. If a SIG or subproject determines this is a relevant issue, they will accept it by applying the The 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/test-infra repository. |
/sig scheduling |
Can I work on this? |
this is being worked on. see #122068 |
I see, Is there any other task that you are aware of and I can work on? Thanks. |
What happened?
Scheduler's default plugin returns an invalid score that is not in the range of [0, 100], resulting in no Pods being scheduled:
After investigation, I found that there was a bug in the code that built the framework when the scheduler started. When using the plugins declared in the regular extension point to override the plugins declared in the MultiPoint, the traversed variable
enabledSet
will be modified in the following loop:kubernetes/pkg/scheduler/framework/runtime/framework.go
Lines 523 to 534 in ad9b60e
This may cause a same scoring plugin (e.g.
PodTopologySpread
) to be loaded multiple times:Further, this results in a node being processed multiple times by a plugin's (e.g.
PodTopologySpread
's)NormalizeScore
method, resulting in an invalid score that is not in the range of [0, 100]:kubernetes/pkg/scheduler/framework/runtime/framework.go
Lines 1095 to 1108 in ad9b60e
What did you expect to happen?
If the scheduler's MultiPoint feature is used (either through the default plugins or through manual configuration), and the configuration (e.g. the scoring weight) of a certain plugin is overridden in a regular extension point, the plugin will only be loaded once in this extension point, and no illegal scores will be returned.
How can we reproduce it (as minimally and precisely as possible)?
An example KubeSchedulerConfiguration:
Anything else we need to know?
No response
Kubernetes version
K8s v1.24.15 or higher
Cloud provider
None
OS version
Install tools
Container runtime (CRI) and version (if applicable)
Related plugins (CNI, CSI, ...) and versions (if applicable)
The text was updated successfully, but these errors were encountered: