Push up createConfig.CgroupParent processing to parent

Signed-off-by: Jhon Honce <jhonce@redhat.com>

Closes: #370
Approved by: rhatdan
This commit is contained in:
Jhon Honce
2018-02-20 16:00:19 -07:00
committed by Atomic Bot
parent 8a97671145
commit a58e9f7cee
2 changed files with 8 additions and 3 deletions

View File

@@ -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