From 3f004df38482e0f66bde5cc78028d57d52219997 Mon Sep 17 00:00:00 2001 From: Jhon Honce Date: Tue, 20 Feb 2018 10:29:41 -0700 Subject: Implement podman run option --cgroup-parent Example: sudo /usr/local/bin/podman run --cgroup-parent=/zzz fedora cat /proc/self/cgroup Signed-off-by: Jhon Honce Closes: #370 Approved by: rhatdan --- cmd/podman/run.go | 5 +++++ 1 file changed, 5 insertions(+) (limited to 'cmd/podman') diff --git a/cmd/podman/run.go b/cmd/podman/run.go index 169fe6645..ca66aadf2 100644 --- a/cmd/podman/run.go +++ b/cmd/podman/run.go @@ -72,12 +72,17 @@ 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)) ctr, err := runtime.NewContainer(runtimeSpec, options...) if err != nil { return err } logrus.Debug("new container created ", ctr.ID()) + + p, _ := ctr.CGroupPath()("") + logrus.Debugf("createConfig.CgroupParent %v for %v", p, ctr.ID()) + if err := ctr.Init(); err != nil { // This means the command did not exist exitCode = 127 -- cgit v1.2.3-54-g00ecf