From 17ce567c6827abdcd517699bc07e82ccf48f7619 Mon Sep 17 00:00:00 2001 From: Giuseppe Scrivano Date: Thu, 29 Apr 2021 21:08:23 +0200 Subject: 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 --- libpod/runtime_ctr.go | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'libpod/runtime_ctr.go') 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") { -- cgit v1.2.3-54-g00ecf