aboutsummaryrefslogtreecommitdiff
path: root/cmd/podman/run.go
diff options
context:
space:
mode:
authorJhon Honce <jhonce@redhat.com>2018-02-20 10:29:41 -0700
committerAtomic Bot <atomic-devel@projectatomic.io>2018-02-22 12:39:08 +0000
commit3f004df38482e0f66bde5cc78028d57d52219997 (patch)
tree73ca602de3b3953e583ae82296d5d793fad0606a /cmd/podman/run.go
parentf1f0f37dc142dc1687df1750c0d8c8fe1f79111a (diff)
downloadpodman-3f004df38482e0f66bde5cc78028d57d52219997.tar.gz
podman-3f004df38482e0f66bde5cc78028d57d52219997.tar.bz2
podman-3f004df38482e0f66bde5cc78028d57d52219997.zip
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 <jhonce@redhat.com> Closes: #370 Approved by: rhatdan
Diffstat (limited to 'cmd/podman/run.go')
-rw-r--r--cmd/podman/run.go5
1 files changed, 5 insertions, 0 deletions
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