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
{{ message }}
Repository navigation
Test failures on Ubuntu containers (no cgroup mount found in mountinfo) #49
=== RUN TestInvalidCgroupPath
paths_test.go:19: couldn't get cgroup root: no cgroup mount found in mountinfo
--- FAIL: TestInvalidCgroupPath (0.00s)
=== RUN TestTryDefaultCgroupRoot
paths_test.go:102: tryDefaultCgroupRoot: want "/sys/fs/cgroup", got ""
--- FAIL: TestTryDefaultCgroupRoot (0.00s)
=== RUN TestPidsSetMax
--- PASS: TestPidsSetMax (0.00s)
=== RUN TestPidsSetUnlimited
--- PASS: TestPidsSetUnlimited (0.00s)
=== RUN TestPidsStats
--- PASS: TestPidsStats (0.00s)
=== RUN TestPidsStatsUnlimited
--- PASS: TestPidsStatsUnlimited (0.00s)
FAIL
FAIL github.com/opencontainers/cgroups/fs 0.075s
=== RUN TestParseCgroupFromReader
--- PASS: TestParseCgroupFromReader (0.00s)
=== RUN TestDefaultDirPath
defaultpath_test.go:52: need cgroupv2
? github.com/opencontainers/cgroups/internal/path [no test files]
=== RUN TestNilResources
manager_test.go:40: no cgroup mount found in mountinfo
--- FAIL: TestNilResources (0.00s)
=== RUN TestNilResourcesSystemd
manager_test.go:24: requires systemd
--- SKIP: TestNilResourcesSystemd (0.00s)
FAIL
FAIL github.com/opencontainers/cgroups/manager 0.004s
=== RUN TestRangeToBits
changed the title [-]Test failures on Ubuntu containers[/-][+]Test failures on Ubuntu containers (`no cgroup mount found in mountinfo`)[/+]on Oct 31, 2025
Well, you have to have either cgroup v1 or cgroup v2 at /sys/fs/cgroup. Currently it assumes cgroup v1 if none are found, and I guess this assumption fails on a cgroup v2 host.
Maybe it's time to switch the default to cgroup v2 (and see another set of bugs, but what can we do?).
OK, some tests in here requires real cgroup v1 or cgroup v2, which is not available inside a debian/ubuntu test environment. Is there some env var I can use to skip those tests?
Hello, I don't know if the question was to me, but to detect the cgroup version, according to some googling, we can do:
grep cgroup /proc/filesystems
nodev cgroup
nodev cgroup2
Activity
LocutusOfBorg commentedon Oct 29, 2025
Looks like it fails also in Debian under pbuilder environment
golang-github-opencontainers-cgroups_0.0.4-2_amd64.build.txt
[-]Test failures on Ubuntu containers[/-][+]Test failures on Ubuntu containers (`no cgroup mount found in mountinfo`)[/+]siretart commentedon Nov 4, 2025
sounds like this function is not detecting the Ubuntu/Debian build environment correctly:
cgroups/utils.go
Lines 35 to 51 in e0c56cb
kolyshkin commentedon Feb 11, 2026
Well, you have to have either cgroup v1 or cgroup v2 at /sys/fs/cgroup. Currently it assumes cgroup v1 if none are found, and I guess this assumption fails on a cgroup v2 host.
Maybe it's time to switch the default to cgroup v2 (and see another set of bugs, but what can we do?).
kolyshkin commentedon Feb 11, 2026
OK, some tests in here requires real cgroup v1 or cgroup v2, which is not available inside a debian/ubuntu test environment. Is there some env var I can use to skip those tests?
LocutusOfBorg commentedon Apr 9, 2026
Hello, I don't know if the question was to me, but to detect the cgroup version, according to some googling, we can do:
grep cgroup /proc/filesystems
nodev cgroup
nodev cgroup2
stat -fc %T /sys/fs/cgroup/
cgroup2fs
Skip cgroup tests when no cgroups are mounted
Skip cgroup tests when no cgroups are mounted