summaryrefslogtreecommitdiff
path: root/libpod/runtime_ctr.go
diff options
context:
space:
mode:
Diffstat (limited to 'libpod/runtime_ctr.go')
-rw-r--r--libpod/runtime_ctr.go3
1 files changed, 3 insertions, 0 deletions
diff --git a/libpod/runtime_ctr.go b/libpod/runtime_ctr.go
index 709775e4a..ffad9d649 100644
--- a/libpod/runtime_ctr.go
+++ b/libpod/runtime_ctr.go
@@ -85,6 +85,9 @@ func (r *Runtime) NewContainer(ctx context.Context, rSpec *spec.Spec, options ..
if err != nil {
return nil, errors.Wrapf(err, "error retrieving pod %s cgroup", pod.ID())
}
+ if podCgroup == "" {
+ return nil, errors.Wrapf(ErrInternal, "pod %s cgroup is not set", pod.ID())
+ }
ctr.config.CgroupParent = podCgroup
} else {
ctr.config.CgroupParent = CgroupfsDefaultCgroupParent