diff options
author | OpenShift Merge Robot <openshift-merge-robot@users.noreply.github.com> | 2022-01-13 20:25:09 +0100 |
---|---|---|
committer | GitHub <noreply@github.com> | 2022-01-13 20:25:09 +0100 |
commit | 2c510146aa03c74fb00a15bcf81c62b14df9c7ea (patch) | |
tree | 3eed55c2709e17449ea5acde9cbb0a09152dd446 /libpod/runtime_ctr.go | |
parent | 48e63975aac7f13048a4b2e426e36d2c81828d6d (diff) | |
parent | 8dc2464b03a1c4183e0a6264cbe3f99b2f65687f (diff) | |
download | podman-2c510146aa03c74fb00a15bcf81c62b14df9c7ea.tar.gz podman-2c510146aa03c74fb00a15bcf81c62b14df9c7ea.tar.bz2 podman-2c510146aa03c74fb00a15bcf81c62b14df9c7ea.zip |
Merge pull request #12828 from giuseppe/drop-check
libpod: drop check for empty pod cgroup
Diffstat (limited to 'libpod/runtime_ctr.go')
-rw-r--r-- | libpod/runtime_ctr.go | 6 |
1 files changed, 5 insertions, 1 deletions
diff --git a/libpod/runtime_ctr.go b/libpod/runtime_ctr.go index 4475119fb..252279485 100644 --- a/libpod/runtime_ctr.go +++ b/libpod/runtime_ctr.go @@ -356,7 +356,11 @@ func (r *Runtime) setupContainer(ctx context.Context, ctr *Container) (_ *Contai if err != nil { return nil, errors.Wrapf(err, "error retrieving pod %s cgroup", pod.ID()) } - if podCgroup == "" { + expectPodCgroup, err := ctr.expectPodCgroup() + if err != nil { + return nil, err + } + if expectPodCgroup && podCgroup == "" { return nil, errors.Wrapf(define.ErrInternal, "pod %s cgroup is not set", pod.ID()) } canUseCgroup := !rootless.IsRootless() || isRootlessCgroupSet(podCgroup) |