mirror of
https://github.com/containers/podman.git
synced 2025-08-06 19:44:14 +08:00
Merge pull request #23858 from Hitachi/fix-cgroup-path
libpod: fix rootless cgroup path with --cgroup-parent
This commit is contained in:
@ -120,7 +120,7 @@ func assembleSystemdCgroupName(baseSlice, newSlice string) (string, string, erro
|
|||||||
// When we run as rootless, the cgroup has a path like the following:
|
// When we run as rootless, the cgroup has a path like the following:
|
||||||
///sys/fs/cgroup/user.slice/user-@$UID.slice/user@$UID.service/user.slice/user-libpod_pod_$POD_ID.slice
|
///sys/fs/cgroup/user.slice/user-@$UID.slice/user@$UID.service/user.slice/user-libpod_pod_$POD_ID.slice
|
||||||
uid := rootless.GetRootlessUID()
|
uid := rootless.GetRootlessUID()
|
||||||
raw := fmt.Sprintf("user.slice/%s-%d.slice/user@%d.service/%s/%s-%s%s", noSlice, uid, uid, baseSlice, noSlice, newSlice, sliceSuffix)
|
raw := fmt.Sprintf("user.slice/user-%d.slice/user@%d.service/%s/%s-%s%s", uid, uid, baseSlice, noSlice, newSlice, sliceSuffix)
|
||||||
return raw, systemdPath, nil
|
return raw, systemdPath, nil
|
||||||
}
|
}
|
||||||
return systemdPath, systemdPath, nil
|
return systemdPath, systemdPath, nil
|
||||||
|
Reference in New Issue
Block a user