You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
The value specified using the --cpuset-cpus option during pod creation is not set correctly.
Steps to reproduce the issue
Steps to reproduce the issue
Create pod with the option --cpuset-cpus. podman pod create --cpuset-cpus 0 my-pod
Describe the results you received
$ podman pod create --cpuset-cpus 0 my-pod
f5ebcc851517c729f34c27bfe895cf09afc8a51bab055c8244cdb876a8e67e2c
$ journalctl | grep f5ebcc851517c729f34c27bfe895cf09afc8a51bab055c8244cdb876a8e67e2c | grep cpuset
systemd[2274]: user-libpod_pod_f5ebcc851517c729f34c27bfe895cf09afc8a51bab055c8244cdb876a8e67e2c.slice:
Failed to set 'cpuset.cpus' attribute on '/user.slice/user-1000.slice/[email protected]/user.slice/
user-libpod_pod_f5ebcc851517c729f34c27bfe895cf09afc8a51bab055c8244cdb876a8e67e2c.slice' to '4-5': Numerical result out of range
Describe the results you expected
The value specified using the --cpuset-cpus option is set correctly.
podman info output
$ podman version
Client: Podman Engine
Version: 5.3.0-dev
API Version: 5.3.0-dev
Go Version: go1.21.13 (Red Hat 1.21.13-4.el9_4)
Git Commit: 4071bd74bc355c81928c8fa4c3a3ca05ad941929
Built: Wed Oct 23 17:55:48 2024
OS/Arch: linux/amd64
Issue Description
The value specified using the
--cpuset-cpus
option during pod creation is not set correctly.Steps to reproduce the issue
Steps to reproduce the issue
--cpuset-cpus
.podman pod create --cpuset-cpus 0 my-pod
Describe the results you received
$ podman pod create --cpuset-cpus 0 my-pod
f5ebcc851517c729f34c27bfe895cf09afc8a51bab055c8244cdb876a8e67e2c
$ journalctl | grep f5ebcc851517c729f34c27bfe895cf09afc8a51bab055c8244cdb876a8e67e2c | grep cpuset
systemd[2274]: user-libpod_pod_f5ebcc851517c729f34c27bfe895cf09afc8a51bab055c8244cdb876a8e67e2c.slice:
Failed to set 'cpuset.cpus' attribute on '/user.slice/user-1000.slice/[email protected]/user.slice/
user-libpod_pod_f5ebcc851517c729f34c27bfe895cf09afc8a51bab055c8244cdb876a8e67e2c.slice' to '4-5': Numerical result out of range
Describe the results you expected
The value specified using the --cpuset-cpus option is set correctly.
podman info output
$ podman version
Client: Podman Engine
Version: 5.3.0-dev
API Version: 5.3.0-dev
Go Version: go1.21.13 (Red Hat 1.21.13-4.el9_4)
Git Commit: 4071bd74bc355c81928c8fa4c3a3ca05ad941929
Built: Wed Oct 23 17:55:48 2024
OS/Arch: linux/amd64
Podman in a container
No
Privileged Or Rootless
None
Upstream Latest Release
No
Additional environment details
Additional environment details
Additional information
In the following, The value of
CpusetCpus
is being converted to bits as a string, not as a numerical value.https://github.com/containers/common/blob/main/pkg/cgroups/systemd_linux.go#L182
The following conversion function is required.
https://github.com/opencontainers/runc/blob/main/libcontainer/cgroups/systemd/cpuset.go#L14
The text was updated successfully, but these errors were encountered: