Closed pclass-sensonix closed 2 years ago
@giuseppe or @rhatdan ptal
looks like the cpu controller is not enabled.
What is the content of /sys/fs/cgroup/cgroup.subtree_control
?
You may need to enable it manually running echo +cpu > /sys/fs/cgroup/cgroup.subtree_control
as root
@giuseppe - that's what I thought too, but when I look at the output of podman --info, it shows the cpu controller enabled:
cgroupControllers:
- cpuset
- cpu
- io
- memory
- pids
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':
root@company-device-imx8-gateway:/sys/fs/cgroup/libpod_parent# cat /sys/fs/cgroup/cgroup.subtree_control
cpuset cpu io memory pids
root@ company-device-imx8-gateway:/sys/fs/cgroup/libpod_parent# echo +cpu > /sys/fs/cgroup/cgroup.subtree_control
root@ company-device-imx8-gateway:/sys/fs/cgroup/libpod_parent# cat /sys/fs/cgroup/cgroup.subtree_control
cpuset cpu io memory pids
Container fails with:
Error: crun: opening file cpu.max
for writing: No such file or directory: OCI runtime attempted to invoke a command that was not found
I see other syses files related to cpu cgroup control, just not 'cpu.max'.
root@company-device-imx8-gateway:/sys/fs/cgroup/libpod_parent# ls *cpu*
cpu.stat cpu.weight cpu.weight.nice cpuset.cpus cpuset.cpus.effective cpuset.cpus.partition cpuset.mems cpuset.mems.effective
it looks like the kernel was compiled without CONFIG_CFS_BANDWIDTH
.
You either need to enable that in the kernel, or you cannot use --cpus
Hi @giuseppe :wave:
This comment came up in a search I did after I created containers/crun/issues/923 yesterday:
…
_What is the content of
/sys/fs/cgroup/cgroup.subtree_control
?__You may need to enable it manually running
echo +cpu > /sys/fs/cgroup/cgroup.subtree_control
as root_
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,
"
root@company-device-imx8-gateway:/sys/fs/cgroup/libpod_parent# ls -lrt /sys/fs/cgroup/libpod_parent/
"
I hope you don't mind my nosiness curiosity about your issue :nose:
I think you can you help me cement my understanding of cgroup v2 though. Please?
What does ls /sys/fs/cgroup
show you? If there is a cpu.max
file there, what does catting it show you?
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.):