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

VolumeBinding's Score plugin in enabled by default in v1beta3 and v1 config #113705

Open
Huang-Wei opened this issue Nov 7, 2022 · 10 comments
Open
Labels
help wanted Denotes an issue that needs help from a contributor. Must meet "help wanted" guidelines. kind/bug Categorizes issue or PR as related to a bug. needs-triage Indicates an issue or PR lacks a `triage/foo` label and requires one. sig/scheduling Categorizes an issue or PR as relevant to SIG Scheduling.

Comments

@Huang-Wei
Copy link
Member

What happened?

Followed up with @alculquicondor, VolumeBinding Score plugin is enabled only when the feature gate VolumeCapacityPriority is enabled:

func applyFeatureGates(config *v1beta2.Plugins) {
if utilfeature.DefaultFeatureGate.Enabled(features.VolumeCapacityPriority) {
config.Score.Enabled = append(config.Score.Enabled, v1beta2.Plugin{Name: names.VolumeBinding, Weight: pointer.Int32(1)})
}
}

However, with v1beta3 and v1, VolumeBinding Score plugin is no longer feature gated (although its underlying logic is).

What did you expect to happen?

We'd pursue disabling a plugin if the feature gate is disabled. Another thread: #113275 (comment)

How can we reproduce it (as minimally and precisely as possible)?

Run kube-scheduler using a v1beta3 or v1 config, without enabling VolumeCapacityPriority feature gate.

Anything else we need to know?

No response

Kubernetes version

$ kubectl version
# paste output here

Cloud provider

N/A

OS version

# On Linux:
$ cat /etc/os-release
# paste output here
$ uname -a
# paste output here

# On Windows:
C:\> wmic os get Caption, Version, BuildNumber, OSArchitecture
# paste output here

Install tools

Container runtime (CRI) and version (if applicable)

Related plugins (CNI, CSI, ...) and versions (if applicable)

@Huang-Wei Huang-Wei added the kind/bug Categorizes issue or PR as related to a bug. label Nov 7, 2022
@k8s-ci-robot k8s-ci-robot added the needs-sig Indicates an issue or PR lacks a `sig/foo` label and requires one. label Nov 7, 2022
@Huang-Wei
Copy link
Member Author

/sig scheduling

@k8s-ci-robot
Copy link
Contributor

@Huang-Wei: This issue is currently awaiting triage.

If a SIG or subproject determines this is a relevant issue, they will accept it by applying the triage/accepted label and provide further guidance.

The triage/accepted label can be added by org members by writing /triage accepted in a comment.

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.

@k8s-ci-robot k8s-ci-robot added needs-triage Indicates an issue or PR lacks a `triage/foo` label and requires one. sig/scheduling Categorizes an issue or PR as relevant to SIG Scheduling. and removed needs-sig Indicates an issue or PR lacks a `sig/foo` label and requires one. labels Nov 7, 2022
@alculquicondor
Copy link
Member

Can we actually do this retroactively?

@pohly
Copy link
Contributor

pohly commented Nov 8, 2022

/cc

pohly added a commit to pohly/kubernetes that referenced this issue Nov 8, 2022
As discussed for other plugins, a plugin that only does some work when a
certain feature gate is enabled should only get included in the default
configuration when that feature gate is enabled.

The plugin still needs to check the feature gate itself because it might be
enabled explicitly in some configuration, with the feature gate off.

Ref:
- kubernetes#113705
- kubernetes#113275 (comment)
@Huang-Wei
Copy link
Member Author

Can we actually do this retroactively?

I think we should as it's a bug in terms of configuration's correctness, although not a bug in the POV of plugin behavior.

cc @ahg-g @liggitt @cofyc

@ahg-g
Copy link
Member

ahg-g commented Nov 8, 2022

hmm, the issue is that the fix will break existing configurations that explicitly set the score plugin in the config while the feature is disabled, although I don't expect anyone to do that, it is safer to just keep it as is and just try to graduate the feature asap.

@Huang-Wei
Copy link
Member Author

that explicitly set the score plugin in the config while the feature is disabled

Although it's pretty rare, but yes, this case will be impacted. And this is the cost of not making things right in the beginning :(

So if we're good on keeping this mistake as-is, I'm gonna close #113706. However, it's uncertain how soon we can graduate VolumeCapacityPriority, it's worth adding comments explaining this is an incorrect pattern so others won't accidentally "copy" the wrong pattern (like @pohly almost used the wrong pattern). WDYT?

@alculquicondor
Copy link
Member

+1 on a comment

pohly added a commit to pohly/kubernetes that referenced this issue Nov 9, 2022
As discussed for other plugins, a plugin that only does some work when a
certain feature gate is enabled should only get included in the default
configuration when that feature gate is enabled.

The plugin still needs to check the feature gate itself because it might be
enabled explicitly in some configuration, with the feature gate off.

Ref:
- kubernetes#113705
- kubernetes#113275 (comment)
pohly added a commit to pohly/kubernetes that referenced this issue Nov 9, 2022
As discussed for other plugins, a plugin that only does some work when a
certain feature gate is enabled should only get included in the default
configuration when that feature gate is enabled.

The plugin still needs to check the feature gate itself because it might be
enabled explicitly in some configuration, with the feature gate off.

Ref:
- kubernetes#113705
- kubernetes#113275 (comment)
pohly added a commit to pohly/kubernetes that referenced this issue Nov 10, 2022
As discussed for other plugins, a plugin that only does some work when a
certain feature gate is enabled should only get included in the default
configuration when that feature gate is enabled.

The plugin still needs to check the feature gate itself because it might be
enabled explicitly in some configuration, with the feature gate off.

Ref:
- kubernetes#113705
- kubernetes#113275 (comment)
@Huang-Wei
Copy link
Member Author

/help

TODO: document that it's incorrect to enable VolumeCapacityPriority plugin without regard of its feature gate.

@k8s-ci-robot
Copy link
Contributor

@Huang-Wei:
This request has been marked as needing help from a contributor.

Guidelines

Please ensure that the issue body includes answers to the following questions:

  • Why are we solving this issue?
  • To address this issue, are there any code changes? If there are code changes, what needs to be done in the code and what places can the assignee treat as reference points?
  • Does this issue have zero to low barrier of entry?
  • How can the assignee reach out to you for help?

For more details on the requirements of such an issue, please see here and ensure that they are met.

If this request no longer meets these requirements, the label can be removed
by commenting with the /remove-help command.

In response to this:

/help

TODO: document that it's incorrect to enable VolumeCapacityPriority plugin without regard of its feature gate.

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.

@k8s-ci-robot k8s-ci-robot added the help wanted Denotes an issue that needs help from a contributor. Must meet "help wanted" guidelines. label Nov 11, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
help wanted Denotes an issue that needs help from a contributor. Must meet "help wanted" guidelines. kind/bug Categorizes issue or PR as related to a bug. needs-triage Indicates an issue or PR lacks a `triage/foo` label and requires one. sig/scheduling Categorizes an issue or PR as relevant to SIG Scheduling.
Projects
Status: Needs Triage
Development

Successfully merging a pull request may close this issue.

5 participants