Skip to content

Commit

Permalink
libpod: fix rootless cgroup path with --cgroup-parent
Browse files Browse the repository at this point in the history
Signed-off-by: Yuta Maeda <[email protected]>
  • Loading branch information
mmmmaeda committed Sep 4, 2024
1 parent beffd05 commit 0129603
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion libpod/util_linux.go
Original file line number Diff line number Diff line change
Expand Up @@ -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:
///sys/fs/cgroup/user.slice/user-@$UID.slice/user@$UID.service/user.slice/user-libpod_pod_$POD_ID.slice
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 systemdPath, systemdPath, nil
Expand Down

0 comments on commit 0129603

Please sign in to comment.