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

cgroup cpuset is not set correctly #2229

Closed
mmmmaeda opened this issue Nov 5, 2024 · 0 comments · Fixed by #2230
Closed

cgroup cpuset is not set correctly #2229

mmmmaeda opened this issue Nov 5, 2024 · 0 comments · Fixed by #2230

Comments

@mmmmaeda
Copy link
Contributor

mmmmaeda commented Nov 5, 2024

The cpuset value setting for cgroup is not set correctly.

In Podman, there are the following issues:
containers/podman#24465

The value specified using the --cpuset-cpus option during pod creation is not set correctly as shown below.

$ 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

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

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging a pull request may close this issue.

1 participant