-
Notifications
You must be signed in to change notification settings - Fork 39.9k
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
add --system-reserved support for swap(cgroup v2 only): only for burstable pods #105271
Conversation
Skipping CI for Draft Pull Request. |
/cc ehashman kevindelgado @yxxhero |
@pacoxu: GitHub didn't allow me to request PR reviews from the following users: yxxhero. Note that only kubernetes members and repo collaborators can review this PR, and authors cannot review their own PRs. In response to this:
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. |
Some testing on my cluster
|
99da08f
to
d865da9
Compare
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Thanks @pacoxu! Great Job!
Left some minor comments below
@@ -260,6 +267,9 @@ func (m *cgroupManagerImpl) Validate(name CgroupName) error { | |||
// in https://github.com/opencontainers/runc/issues/1440 | |||
// once resolved, we can remove this code. | |||
allowlistControllers := sets.NewString("cpu", "cpuacct", "cpuset", "memory", "systemd", "pids") | |||
if utilfeature.DefaultFeatureGate.Enabled(kubefeatures.NodeSwap) && swapControllerV2Available() { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
IIUC, there is no "swap" controller, but there are swap knobs that are part of the memory controller.
AFAIK, all cgroups with the memory controller enabled are also exposed to swap knobs.
Please correct me if I'm wrong.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This function swapControllerV2Available is // swap controller is available only if cgroup v2 swap file is accessible.
.
So we may rename it to something like swapCgroupV2FileAvailable
?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
- In which situations the swap knobs are missing with cgroups v2 and memory controller enabled?
- IIUC the whole purpose here is to add swap to
allowlistControllers
. Is that necessary?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
So it seems that no need to run swapCgroupV2FileAvailable
here. I drop it.
@iholder101 thanks for the review and updated accordingly. |
[APPROVALNOTIFIER] This PR is NOT APPROVED This pull-request has been approved by: mmiranda96, pacoxu The full list of commands accepted by this bot can be found here.
Needs approval from an approver in each of these files:
Approvers can indicate their approval by writing |
Signed-off-by: Paco Xu <paco.xu@daocloud.io>
Signed-off-by: Paco Xu <paco.xu@daocloud.io> Co-authored-by: Elana Hashman <ehashman@users.noreply.github.com>
Signed-off-by: Paco Xu <paco.xu@daocloud.io> Co-authored-by: haoyun <yun.hao@daocloud.io>
Signed-off-by: Paco Xu <paco.xu@daocloud.io>
@pacoxu: The following tests failed, say
Full PR test history. Your PR dashboard. Please help us cut down on flakes by linking to an open issue when you hit one in your PR. 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. I understand the commands that are listed here. |
PR needs rebase. 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. |
The Kubernetes project currently lacks enough active contributors to adequately respond to all issues and PRs. This bot triages PRs according to the following rules:
You can:
Please send feedback to sig-contributor-experience at kubernetes/community. /close |
@k8s-triage-robot: Closed this PR. In response to this:
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. |
/kind feature
/sig node
/triage accepted
/priority important-soon
/kind api-change
Pending on kubernetes/test-infra#24919 to test the e2e part of this PR.
Fixes #105019
Additional documentation e.g., KEPs (Kubernetes Enhancement Proposals), usage docs, etc.: