-
Notifications
You must be signed in to change notification settings - Fork 2.6k
Support --cpuset-cpus and --cpuset-mems in podman kube play #26174
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
base: main
Are you sure you want to change the base?
Conversation
[APPROVALNOTIFIER] This PR is NOT APPROVED This pull-request has been approved by: fpoirotte 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 |
5e48343
to
52f2ff1
Compare
@@ -393,6 +393,28 @@ func ToSpecGen(ctx context.Context, opts *CtrSpecGenOptions) (*specgen.SpecGener | |||
} | |||
} | |||
|
|||
if cpuset, ok := annotations[define.CpusetAnnotation+"/"+opts.Container.Name]; ok { |
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.
Not for this PR, but I wonder if we shouldn't detect annotations referring to nonexistent containers and warn the user... Would help folks rolling YAML by hand
Test failures seem unrelated, the file it's complaining about wasn't changed by this PR. |
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.
to fix CI this needs to be rebased now that #26175 is merged.
52f2ff1
to
22c2661
Compare
I rebased the commit. It seems the tests are now failing because the machine running the CI does not delegate the cpuset cgroup controller to the systemd user slice (see for example https://api.cirrus-ci.com/v1/artifact/task/4778134366584832/html/int-podman-debian-13-rootless-host-sqlite.log.html#t--Podman-kube-play-test-cpuset-annotation--1). |
Only rootless tests are failing so you can SkipIfRootless your new tests
…On Wed, May 21, 2025 at 12:03 François Poirotte ***@***.***> wrote:
*fpoirotte* left a comment (containers/podman#26174)
<#26174 (comment)>
I rebased the commit. It seems the tests are now failing because the
machine running the CI does not delegate the cpuset cgroup controller to
the systemd user slice (see for example
https://api.cirrus-ci.com/v1/artifact/task/4778134366584832/html/int-podman-debian-13-rootless-host-sqlite.log.html#t--Podman-kube-play-test-cpuset-annotation--1
).
—
Reply to this email directly, view it on GitHub
<#26174 (comment)>,
or unsubscribe
<https://github.com/notifications/unsubscribe-auth/AB3AOCCS7GX7BBXTABSGCHT27SPWFAVCNFSM6AAAAAB5TIAJ7KVHI2DSMVQWIX3LMV43OSLTON2WKQ3PNVWWK3TUHMZDQOJYGQ4TEOBVGQ>
.
You are receiving this because you commented.Message ID:
***@***.***>
|
bd87914
to
1418bc4
Compare
[NON-BLOCKING] Packit jobs failed. @containers/packit-build please check. Everyone else, feel free to ignore. |
1 similar comment
[NON-BLOCKING] Packit jobs failed. @containers/packit-build please check. Everyone else, feel free to ignore. |
This commit adds two new annotations named io.podman.annotations.cpuset/$ctrname and io.podman.annotations.memory-nodes/$ctrname The first one allows restricting a container's execution to specific CPU cores while the second restricts memory allocations to specific NUMA memory nodes. They are also added automatically when the --cpuset-cpus and --cpuset-mems options are used. Fixes: containers#26172 Signed-off-by: François Poirotte <[email protected]>
Access to the cpuset cgroup controller is needed to run these tests. Configuration on the CI workers prevents access to this controller for rootless pods. Signed-off-by: François Poirotte <[email protected]>
1418bc4
to
9d4267c
Compare
This commit adds two new annotations named
io.podman.annotations.cpuset/$ctrname
andio.podman.annotations.memory-nodes/$ctrname
The first one allows restricting a container's execution to specific CPU cores while the second one restricts memory allocations to specific NUMA memory nodes. They are also added automatically when the
--cpuset-cpus
and--cpuset-mems
options are used.This is largely inspired by previous work from Jan Kaluza (f15b088) to add support for
--pids-limit
in podman kube play.Fixes: #26172
Does this PR introduce a user-facing change?