-
Notifications
You must be signed in to change notification settings - Fork 2.4k
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
Cannot run container as root with Podman due to Cgroups issue with missing cpu.max sysfs file #13379
Comments
looks like the cpu controller is not enabled. What is the content of You may need to enable it manually running |
@giuseppe - that's what I thought too, but when I look at the output of podman --info, it shows the cpu controller enabled:
I also tried your suggestion with the subtree_control file. The file already showed cpu, but I ran the command to enabled it again - however it still fails when I run the container with 'missing cpu.max':
Container fails with: |
I see other syses files related to cpu cgroup control, just not 'cpu.max'.
|
it looks like the kernel was compiled without You either need to enable that in the kernel, or you cannot use |
Hi @giuseppe 👋 This comment came up in a search I did after I created containers/crun/issues/923 yesterday:
I'm curious whether or not this issue might be related in any way to containers/crun/issues/923? Your thoughts, please? TIA. |
Hey @pclass-sensonix,
I hope you don't mind my I think you can you help me cement my understanding of cgroup v2 though. Please? What does I appreciate it's a long shot of a chance that you would still have a similar deployment after this amount of time. TIA. |
/kind bug
Description
I can not run my container using Podman 4.0.0 on my Linux 5.4 i.MX8 device due to missing 'cpu.max' cgroups file. The system was built by Yocto. If I remove the cpus flag from my podman start command, the container starts properly. The cgroups configuration seems to be fine to me with the cpu cgroup controller shown as being enabled.
I also have a Microchip device with the same podman and systemd versions, again built by Yocto, and podman starts the same container image, with the failing set of arguments just fine. One difference is that this device runs Linux version 5.10.
The podman configuration files are the same for each device.
Steps to reproduce the issue:
Boot Linux
Run container with cpu limitation option:
/usr/bin/podman run -it --root /container-storage/containers/storage --memory="60m" --memory-swap="60m" --cpus="0.75" company-base:1.4 /bin/sh
Describe the results you received:
Observed the following error:
Describe the results you expected:
Podman container runs okay.
Additional information you deem important (e.g. issue happens only occasionally):
This happens every time when I specify the cpus flag. If I do not use the cpus flag, the container starts fine.
Output of
podman version
:Output of
podman info --debug
:Package info (e.g. output of
rpm -q podman
orapt list podman
):Additional info:
Cgroups info:
Cgroup Controllers:
Kernel Configuration:
Cgroup FS:
Linux Kernel Version:
SystemD Version:
Working Device Specifics
Working Device podman info:
Working device Cgroups:
Working Device kernel config:
Working Device Kernel / SystemD / and Cgroups fs:
Have you tested with the latest version of Podman and have you checked the Podman Troubleshooting Guide? (https://github.com/containers/podman/blob/main/troubleshooting.md)
Yes
Additional environment details (AWS, VirtualBox, physical, etc.):
The text was updated successfully, but these errors were encountered: