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>
This commit is contained in:
parent
3426d56b92
commit
5c39797624
|
|
@ -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
|
||||
}
|
||||
|
||||
|
|
|
|||
Loading…
Reference in New Issue