aboutsummaryrefslogtreecommitdiff
path: root/cmd/podman/run.go
diff options
context:
space:
mode:
authorJhon Honce <jhonce@redhat.com>2018-02-20 16:00:19 -0700
committerAtomic Bot <atomic-devel@projectatomic.io>2018-02-22 12:39:08 +0000
commita58e9f7cee4c0b6060b91246ea4a007eebb30d7f (patch)
tree81478d87f44977273a6bdb62efbed947ff9764b9 /cmd/podman/run.go
parent8a9767114550bb0951eb605cb8bd537a834d2ac9 (diff)
downloadpodman-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 'cmd/podman/run.go')
-rw-r--r--cmd/podman/run.go8
1 files changed, 7 insertions, 1 deletions
diff --git a/cmd/podman/run.go b/cmd/podman/run.go
index ca66aadf2..32b3b9bdc 100644
--- a/cmd/podman/run.go
+++ b/cmd/podman/run.go
@@ -72,7 +72,13 @@ func runCmd(c *cli.Context) error {
options = append(options, libpod.WithUser(createConfig.User))
options = append(options, libpod.WithShmDir(createConfig.ShmDir))
options = append(options, libpod.WithShmSize(createConfig.Resources.ShmSize))
- options = append(options, libpod.WithCgroupParent(createConfig.CgroupParent))
+
+ // Default used if not overridden on command line
+
+ if createConfig.CgroupParent != "" {
+ options = append(options, libpod.WithCgroupParent(createConfig.CgroupParent))
+ }
+
ctr, err := runtime.NewContainer(runtimeSpec, options...)
if err != nil {
return err