From 2fad29ccb2a048eb69f52014ae17db2a11a76256 Mon Sep 17 00:00:00 2001 From: Giuseppe Scrivano Date: Mon, 12 Apr 2021 16:52:42 +0200 Subject: cgroup: do not set cgroup parent when rootless and cgroupfs do not set the cgroup parent when running as rootless with cgroupfs, even if cgroup v2 is used. Closes: https://bugzilla.redhat.com/show_bug.cgi?id=1947999 Signed-off-by: Giuseppe Scrivano --- test/system/420-cgroups.bats | 5 +++++ 1 file changed, 5 insertions(+) (limited to 'test/system/420-cgroups.bats') diff --git a/test/system/420-cgroups.bats b/test/system/420-cgroups.bats index 615e43e6c..89c81a742 100644 --- a/test/system/420-cgroups.bats +++ b/test/system/420-cgroups.bats @@ -24,6 +24,11 @@ load helpers run_podman container inspect --format '{{.HostConfig.CgroupManager}}' myc is "$output" "$other" "podman preserved .HostConfig.CgroupManager" + if is_rootless && test $other = cgroupfs ; then + run_podman container inspect --format '{{.HostConfig.CgroupParent}}' myc + is "$output" "" "podman didn't set .HostConfig.CgroupParent for cgroupfs and rootless" + fi + # Restart the container, without --cgroup-manager option (ie use default) # Prior to #7970, this would fail with an OCI runtime error run_podman start myc -- cgit v1.2.3-54-g00ecf