From a58e9f7cee4c0b6060b91246ea4a007eebb30d7f Mon Sep 17 00:00:00 2001 From: Jhon Honce Date: Tue, 20 Feb 2018 16:00:19 -0700 Subject: Push up createConfig.CgroupParent processing to parent Signed-off-by: Jhon Honce Closes: #370 Approved by: rhatdan --- cmd/podman/run.go | 8 +++++++- 1 file changed, 7 insertions(+), 1 deletion(-) (limited to 'cmd') 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 -- cgit v1.2.3-54-g00ecf