Cgroups mounts detection is not working inside LXC on CentOS 7 host
Nobody has claimed this yet.
Assessment
- Difficulty
- 4/5
- Estimated time
- 3-5 days
- Newbie friendliness
- 35/100
- Issue type
- Bug
- Clarity
- Mostly clear
- Activity status
- Stale
- Tech stack
- centos, go, linux
- Domain
- operating-systems
Research direction
Start in libcontainer/cgroups/utils.go around the mount filesystem detection referenced in the issue, and reproduce the supplied /proc/self/mountinfo case inside LXC on a CentOS 7 host. Compare the detected filesystem with the cgroup mounts shown there and inspect relevant cgroup tests. Done means the mounts are detected correctly in this environment and the daemon no longer reports the listed missing cgroup mounts.
Written by the indexing model from the issue text.
Description
The list of relevant errors from dockerd:
level=warning msg="Your kernel does not support cgroup memory limit"
level=warning msg="Unable to find cpu cgroup in mounts"
level=warning msg="Unable to find blkio cgroup in mounts"
level=warning msg="Unable to find cpuset cgroup in mounts"
level=warning msg="mountpoint for pids not found"
Error starting daemon: Devices cgroup isn't mounted
(container)$ cat /proc/self/mountinfo | grep cgroup
597 596 0:67 / /sys/fs/cgroup rw,nosuid,nodev,noexec,relatime - tmpfs none rw,size=10240k,mode=755,uid=1000000,gid=1000000
598 597 0:52 /cgroup/blkio /sys/fs/cgroup/blkio rw,nosuid,nodev,relatime master:203 - fuse.lxcfs lxcfs rw,user_id=0,group_id=0,allow_other
599 597 0:52 /cgroup/cpuacct,cpu /sys/fs/cgroup/cpuacct,cpu rw,nosuid,nodev,relatime master:203 - fuse.lxcfs lxcfs rw,user_id=0,group_id=0,allow_other
600 597 0:52 /cgroup/cpuset /sys/fs/cgroup/cpuset rw,nosuid,nodev,relatime master:203 - fuse.lxcfs lxcfs rw,user_id=0,group_id=0,allow_other
601 597 0:52 /cgroup/devices /sys/fs/cgroup/devices rw,nosuid,nodev,relatime master:203 - fuse.lxcfs lxcfs rw,user_id=0,group_id=0,allow_other
602 597 0:52 /cgroup/freezer /sys/fs/cgroup/freezer rw,nosuid,nodev,relatime master:203 - fuse.lxcfs lxcfs rw,user_id=0,group_id=0,allow_other
621 597 0:52 /cgroup/hugetlb /sys/fs/cgroup/hugetlb rw,nosuid,nodev,relatime master:203 - fuse.lxcfs lxcfs rw,user_id=0,group_id=0,allow_other
622 597 0:52 /cgroup/memory /sys/fs/cgroup/memory rw,nosuid,nodev,relatime master:203 - fuse.lxcfs lxcfs rw,user_id=0,group_id=0,allow_other
623 597 0:52 /cgroup/name=systemd /sys/fs/cgroup/systemd rw,nosuid,nodev,relatime master:203 - fuse.lxcfs lxcfs rw,user_id=0,group_id=0,allow_other
745 597 0:52 /cgroup/net_prio,net_cls /sys/fs/cgroup/net_prio,net_cls rw,nosuid,nodev,relatime master:203 - fuse.lxcfs lxcfs rw,user_id=0,group_id=0,allow_other
746 597 0:52 /cgroup/perf_event /sys/fs/cgroup/perf_event rw,nosuid,nodev,relatime master:203 - fuse.lxcfs lxcfs rw,user_id=0,group_id=0,allow_other
788 597 0:52 /cgroup/pids /sys/fs/cgroup/pids rw,nosuid,nodev,relatime master:203 - fuse.lxcfs lxcfs rw,user_id=0,group_id=0,allow_other
(host)$ uname -a
Linux n4.mga.local 3.10.0-957.12.2.el7.x86_64 #1 SMP Tue May 14 21:24:32 UTC 2019 x86_64 x86_64 x86_64 GNU/Linux
As you can see, the file system in this case is fuse.lxcfs whereas at https://github.com/opencontainers/runc/blob/master/libcontainer/cgroups/utils.go#L156 it's expected to find either cgroup2 or cgroup.
It's completely outside of my expertise but as far as I can tell, LXCFS is used in this case to provide "a container aware cgroupfs tree" because kernels < 4.6 do not have cgroup namespaces support.
- Dominant language
- Go
- Stars
- 13.5k
- Forks
- 2.3k
- Avg merge
- 2d 8h
- Merged PRs (30d)
- 30
Contributor guide
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
More from opencontainers/runc
-
`root.readonly` is silently ignored (rootfs left writable) when the container has no mount namespace Openllm-generated
Difficulty 2/5 1-3 hours Newbie friendliness 78/100
opencontainers/runc#5371 ·
-
llm-generated
Difficulty 2/5 1-3 hours Newbie friendliness 90/100
opencontainers/runc#5370 ·
-
Difficulty 2/5 1-3 hours Newbie friendliness 68/100
opencontainers/runc#2214 · 3 comments ·
-
Difficulty 1/5 Under an hour Newbie friendliness 68/100
opencontainers/runc#1679 · 1 comment ·
-
Difficulty 3/5 1-2 days Newbie friendliness 68/100
opencontainers/runc#5474 ·
All issues in opencontainers/runc
Similar issues
-
optimization optimization:agents-md-curator
Difficulty 2/5 1-3 hours Newbie friendliness 86/100
githubnext/gh-aw-cao#13143 ·
-
Difficulty 2/5 1-3 hours Newbie friendliness 84/100
blinklabs-io/bursa#904 ·
-
Difficulty 2/5 1-3 hours Newbie friendliness 84/100
yanet-platform/ipfw-go#129 ·
-
bug confmap/provider/googlesecretmanagerprovider needs triage
Difficulty 2/5 1-3 hours Newbie friendliness 72/100
open-telemetry/opentelemetry-collector-contrib#51273 · 2 comments ·
-
bug: AI Gateway client filter lists "Unknown" twice when NULL and literal Unknown clients coexist Openbug
Difficulty 2/5 1-3 hours Newbie friendliness 90/100