diff options
author | OpenShift Merge Robot <openshift-merge-robot@users.noreply.github.com> | 2019-09-11 00:58:46 +0200 |
---|---|---|
committer | GitHub <noreply@github.com> | 2019-09-11 00:58:46 +0200 |
commit | 7ac6ed3b4b27621e7aa15da335e65ffa601fb83e (patch) | |
tree | 397083da135855ec39a94abd834fefc18079607a /cmd | |
parent | 997c4b56ed2121726e966afe9a102ed16ba78f93 (diff) | |
parent | c2284962c798a11f3c956ee237f27cfd3b0fcb21 (diff) | |
download | podman-7ac6ed3b4b27621e7aa15da335e65ffa601fb83e.tar.gz podman-7ac6ed3b4b27621e7aa15da335e65ffa601fb83e.tar.bz2 podman-7ac6ed3b4b27621e7aa15da335e65ffa601fb83e.zip |
Merge pull request #3581 from mheon/no_cgroups
Support running containers without CGroups
Diffstat (limited to 'cmd')
-rw-r--r-- | cmd/podman/common.go | 4 | ||||
-rw-r--r-- | cmd/podman/shared/create.go | 1 | ||||
-rw-r--r-- | cmd/podman/shared/intermediate.go | 2 |
3 files changed, 7 insertions, 0 deletions
diff --git a/cmd/podman/common.go b/cmd/podman/common.go index 9724d18c6..0115e6ef1 100644 --- a/cmd/podman/common.go +++ b/cmd/podman/common.go @@ -135,6 +135,10 @@ func getCreateFlags(c *cliconfig.PodmanCommand) { "cgroup namespace to use", ) createFlags.String( + "cgroups", "enabled", + "control container cgroup configuration", + ) + createFlags.String( "cgroup-parent", "", "Optional parent cgroup for the container", ) diff --git a/cmd/podman/shared/create.go b/cmd/podman/shared/create.go index acbd53dba..fc8197721 100644 --- a/cmd/podman/shared/create.go +++ b/cmd/podman/shared/create.go @@ -695,6 +695,7 @@ func ParseCreateOpts(ctx context.Context, c *GenericCLIResults, runtime *libpod. CapDrop: c.StringSlice("cap-drop"), CidFile: c.String("cidfile"), Cgroupns: c.String("cgroupns"), + Cgroups: c.String("cgroups"), CgroupParent: c.String("cgroup-parent"), Command: command, UserCommand: userCommand, diff --git a/cmd/podman/shared/intermediate.go b/cmd/podman/shared/intermediate.go index 5aaac8687..cccdd1bea 100644 --- a/cmd/podman/shared/intermediate.go +++ b/cmd/podman/shared/intermediate.go @@ -370,6 +370,8 @@ func NewIntermediateLayer(c *cliconfig.PodmanCommand, remote bool) GenericCLIRes m["blkio-weight-device"] = newCRStringSlice(c, "blkio-weight-device") m["cap-add"] = newCRStringSlice(c, "cap-add") m["cap-drop"] = newCRStringSlice(c, "cap-drop") + m["cgroupns"] = newCRString(c, "cgroupns") + m["cgroups"] = newCRString(c, "cgroups") m["cgroup-parent"] = newCRString(c, "cgroup-parent") m["cidfile"] = newCRString(c, "cidfile") m["conmon-pidfile"] = newCRString(c, "conmon-pidfile") |