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
[WIP] Add initial support for updating systemd slices #88404
Conversation
[APPROVALNOTIFIER] This PR is NOT APPROVED This pull-request has been approved by: odinuge 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 |
b652fc3
to
0211668
Compare
/retest |
0211668
to
badbdd4
Compare
cc @sjenning |
I think the update should be in the opencontainers/runc Manager. Is that not possible? |
This makes it possible to update existing systemd slices. This was previously not working, and the "top" slices for the different qos levels were always set to nodeCapacity. This will update the correct slice values using a dbus connection to systemd. We still have to run "setSupportedSubsystems" since systemd slices don't support all the resouces we use. This currently only applies to huge pages.
858763e
to
12e9ffc
Compare
I do agree that this code may fit better outside the k/k repo, but I am not sure if it would fit in runc/libcontainer. The way we use Some of the code in But that is just my thoughts tho. |
/cc derekwaynecarr |
Ref. cgroupv2 implemenetation discussions: |
@odinuge: GitHub didn't allow me to request PR reviews from the following users: AkihiroSuda, giuseppe. 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. |
@odinuge: 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 amount of the code copied from runc is relatively huge, so I prefer this PR to be applied to runc repo as well, but not a blocker, I think. |
newProp("MemoryLimit", uint64(c.Resources.Memory))) | ||
} | ||
|
||
if c.Resources.CpuShares != 0 { |
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 won't work on cgroup v2.
We would need to set the CPUWeight=
property (#89567 moves the conversion to a new function so should be easier to use)
newProp("CPUQuotaPerSecUSec", cpuQuotaPerSecUSec)) | ||
} | ||
|
||
if c.Resources.BlkioWeight != 0 { |
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.
is it currently used by the kubelet or can we drop it? For cgroup v2 we would need to convert to a different range and use the IOWeight=
property
Fixed in runc, closing in favor of #90489 |
What type of PR is this?
/kind bug
What this PR does / why we need it:
Which issue(s) this PR fixes:
Fixes #88197
Special notes for your reviewer:
Does this PR introduce a user-facing change?:
Additional documentation e.g., KEPs (Kubernetes Enhancement Proposals), usage docs, etc.: