aboutsummaryrefslogtreecommitdiff
path: root/utils
diff options
context:
space:
mode:
authorGiuseppe Scrivano <gscrivan@redhat.com>2022-06-30 14:34:18 +0200
committerGiuseppe Scrivano <gscrivan@redhat.com>2022-06-30 14:34:18 +0200
commit5c39797624793be5d7bfd143a0a35d357840214d (patch)
treeed6509a354b6c538f9111fa1227052439c0c2ccd /utils
parent3426d56b92be2ac1c3cc62fc578e9cb6d64aca81 (diff)
downloadpodman-5c39797624793be5d7bfd143a0a35d357840214d.tar.gz
podman-5c39797624793be5d7bfd143a0a35d357840214d.tar.bz2
podman-5c39797624793be5d7bfd143a0a35d357840214d.zip
utils: move the cgroup if root on cgroupv2
if we are running on cgroupv2, force the creation of a sub-cgroup even when we are at the root for the cgroup v2 unified mount. Signed-off-by: Giuseppe Scrivano <gscrivan@redhat.com>
Diffstat (limited to 'utils')
-rw-r--r--utils/utils_supported.go2
1 files changed, 1 insertions, 1 deletions
diff --git a/utils/utils_supported.go b/utils/utils_supported.go
index c2dcc4631..6378212b6 100644
--- a/utils/utils_supported.go
+++ b/utils/utils_supported.go
@@ -137,7 +137,7 @@ func moveUnderCgroup(cgroup, subtree string, processes []uint32) error {
}
// root cgroup, skip it
- if parts[2] == "/" {
+ if parts[2] == "/" && !(unifiedMode && parts[1] == "") {
continue
}