diff options
author | Konstantin Baranov <konstantin.baranov@workato.com> | 2020-10-02 14:37:55 -0700 |
---|---|---|
committer | Konstantin Baranov <konstantin.baranov@workato.com> | 2020-10-02 14:37:55 -0700 |
commit | 6321eccddce2b59976454799dcd25bc60ce5b0e8 (patch) | |
tree | 6416598a241b17397eabaec41146361c1d79e1d1 /runsc | |
parent | b8dc9a889f3d945bcd0f02f8ca34eb2e579e8b0e (diff) |
Treat absent "linux" section is empty "cgroupsPath" too
Diffstat (limited to 'runsc')
-rw-r--r-- | runsc/container/container.go | 5 |
1 files changed, 4 insertions, 1 deletions
diff --git a/runsc/container/container.go b/runsc/container/container.go index 15c445754..21a01b5de 100644 --- a/runsc/container/container.go +++ b/runsc/container/container.go @@ -311,7 +311,10 @@ func New(conf *boot.Config, args Args) (*Container, error) { if isRoot(args.Spec) { log.Debugf("Creating new sandbox for container %q", args.ID) - if args.Spec.Linux != nil && args.Spec.Linux.CgroupsPath == "" { + if args.Spec.Linux == nil { + args.Spec.Linux = &specs.Linux{} + } + if args.Spec.Linux.CgroupsPath == "" { args.Spec.Linux.CgroupsPath = "/" + args.ID } |