From 01296038dc92e73814417a619b244a40b818976c Mon Sep 17 00:00:00 2001 From: Yuta Maeda Date: Wed, 4 Sep 2024 05:30:35 +0000 Subject: [PATCH] libpod: fix rootless cgroup path with --cgroup-parent Signed-off-by: Yuta Maeda --- libpod/util_linux.go | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/libpod/util_linux.go b/libpod/util_linux.go index ac83857eed..574c58a01f 100644 --- a/libpod/util_linux.go +++ b/libpod/util_linux.go @@ -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