summaryrefslogtreecommitdiff
path: root/libpod/runtime_ctr.go
diff options
context:
space:
mode:
authorGiuseppe Scrivano <gscrivan@redhat.com>2021-04-29 21:08:23 +0200
committerGiuseppe Scrivano <gscrivan@redhat.com>2021-05-03 12:36:03 +0200
commit17ce567c6827abdcd517699bc07e82ccf48f7619 (patch)
tree0bcf14d977e933bac1b3a310b13563d16ed8b47e /libpod/runtime_ctr.go
parent98a84ff34e2f93d50ef4fb41ae127a07bcf5bf42 (diff)
downloadpodman-17ce567c6827abdcd517699bc07e82ccf48f7619.tar.gz
podman-17ce567c6827abdcd517699bc07e82ccf48f7619.tar.bz2
podman-17ce567c6827abdcd517699bc07e82ccf48f7619.zip
cgroup: always honor --cgroup-parent with cgroupfs
if --cgroup-parent is specified, always honor it without doing any detection whether cgroups are supported or not. Closes: https://github.com/containers/podman/issues/10173 Signed-off-by: Giuseppe Scrivano <gscrivan@redhat.com>
Diffstat (limited to 'libpod/runtime_ctr.go')
-rw-r--r--libpod/runtime_ctr.go2
1 files changed, 1 insertions, 1 deletions
diff --git a/libpod/runtime_ctr.go b/libpod/runtime_ctr.go
index 0acf88cbc..328f47c12 100644
--- a/libpod/runtime_ctr.go
+++ b/libpod/runtime_ctr.go
@@ -296,7 +296,7 @@ func (r *Runtime) setupContainer(ctx context.Context, ctr *Container) (_ *Contai
return nil, errors.Wrapf(define.ErrInternal, "pod %s cgroup is not set", pod.ID())
}
ctr.config.CgroupParent = podCgroup
- } else {
+ } else if !rootless.IsRootless() {
ctr.config.CgroupParent = CgroupfsDefaultCgroupParent
}
} else if strings.HasSuffix(path.Base(ctr.config.CgroupParent), ".slice") {