diff options
author | Jhon Honce <jhonce@redhat.com> | 2018-02-20 16:00:19 -0700 |
---|---|---|
committer | Atomic Bot <atomic-devel@projectatomic.io> | 2018-02-22 12:39:08 +0000 |
commit | a58e9f7cee4c0b6060b91246ea4a007eebb30d7f (patch) | |
tree | 81478d87f44977273a6bdb62efbed947ff9764b9 /libpod | |
parent | 8a9767114550bb0951eb605cb8bd537a834d2ac9 (diff) | |
download | podman-a58e9f7cee4c0b6060b91246ea4a007eebb30d7f.tar.gz podman-a58e9f7cee4c0b6060b91246ea4a007eebb30d7f.tar.bz2 podman-a58e9f7cee4c0b6060b91246ea4a007eebb30d7f.zip |
Push up createConfig.CgroupParent processing to parent
Signed-off-by: Jhon Honce <jhonce@redhat.com>
Closes: #370
Approved by: rhatdan
Diffstat (limited to 'libpod')
-rw-r--r-- | libpod/options.go | 3 |
1 files changed, 1 insertions, 2 deletions
diff --git a/libpod/options.go b/libpod/options.go index 6d3091378..56e8fa203 100644 --- a/libpod/options.go +++ b/libpod/options.go @@ -656,7 +656,6 @@ func WithLogPath(path string) CtrCreateOption { } // WithCgroupParent sets the Cgroup Parent of the new container -// Default used if not overridden on command line func WithCgroupParent(parent string) CtrCreateOption { return func(ctr *Container) error { if ctr.valid { @@ -664,7 +663,7 @@ func WithCgroupParent(parent string) CtrCreateOption { } if parent == "" { - return nil + return errors.Wrapf(ErrInvalidArg, "cgroup parent cannot be empty") } ctr.config.CgroupParent = parent |