From d0b0c62853f37685e4f4ca37e537174b5d0fe5c6 Mon Sep 17 00:00:00 2001 From: Peter Jannesen Date: Mon, 10 Jul 2023 22:37:43 +0200 Subject: [PATCH] Fix: cgroup is not set: internal libpod error after os reboot [NO NEW TESTS NEEDED] Closes #19175 Signed-off-by: Peter Jannesen --- libpod/pod_internal_linux.go | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/libpod/pod_internal_linux.go b/libpod/pod_internal_linux.go index fa85666ca1..ef7fefa41b 100644 --- a/libpod/pod_internal_linux.go +++ b/libpod/pod_internal_linux.go @@ -21,7 +21,7 @@ func (p *Pod) platformRefresh() error { } p.state.CgroupPath = cgroupPath case config.CgroupfsCgroupsManager: - if rootless.IsRootless() && isRootlessCgroupSet(p.config.CgroupParent) { + if !rootless.IsRootless() || isRootlessCgroupSet(p.config.CgroupParent) { p.state.CgroupPath = filepath.Join(p.config.CgroupParent, p.ID()) logrus.Debugf("setting pod cgroup to %s", p.state.CgroupPath)