summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--cmd/podman/common/create.go2
-rw-r--r--cmd/podman/common/create_opts.go2
-rw-r--r--cmd/podman/common/specgen.go7
3 files changed, 5 insertions, 6 deletions
diff --git a/cmd/podman/common/create.go b/cmd/podman/common/create.go
index f256d9677..f4c7059d1 100644
--- a/cmd/podman/common/create.go
+++ b/cmd/podman/common/create.go
@@ -55,7 +55,7 @@ func GetCreateFlags(cf *ContainerCLIOpts) *pflag.FlagSet {
"cgroup namespace to use",
)
createFlags.StringVar(
- &cf.CGroups,
+ &cf.CGroupsMode,
"cgroups", containerConfig.Cgroups(),
`control container cgroup configuration ("enabled"|"disabled"|"no-conmon")`,
)
diff --git a/cmd/podman/common/create_opts.go b/cmd/podman/common/create_opts.go
index 9d12e4b26..37fe01460 100644
--- a/cmd/podman/common/create_opts.go
+++ b/cmd/podman/common/create_opts.go
@@ -11,7 +11,7 @@ type ContainerCLIOpts struct {
CapAdd []string
CapDrop []string
CGroupsNS string
- CGroups string
+ CGroupsMode string
CGroupParent string
CIDFile string
ConmonPIDFile string
diff --git a/cmd/podman/common/specgen.go b/cmd/podman/common/specgen.go
index 12fd16551..e8e889e66 100644
--- a/cmd/podman/common/specgen.go
+++ b/cmd/podman/common/specgen.go
@@ -124,7 +124,7 @@ func getPidsLimits(s *specgen.SpecGenerator, c *ContainerCLIOpts, args []string)
pids.Limit = c.PIDsLimit
hasLimits = true
}
- if c.CGroups == "disabled" && c.PIDsLimit > 0 {
+ if c.CGroupsMode == "disabled" && c.PIDsLimit > 0 {
s.ResourceLimits.Pids.Limit = -1
}
if !hasLimits {
@@ -473,12 +473,11 @@ func FillOutSpecGen(s *specgen.SpecGenerator, c *ContainerCLIOpts, args []string
if ld := c.LogDriver; len(ld) > 0 {
s.LogConfiguration.Driver = ld
}
+ s.CgroupParent = c.CGroupParent
+ s.CgroupsMode = c.CGroupsMode
// TODO WTF
//cgroup := &cc.CgroupConfig{
- // Cgroups: c.String("cgroups"),
// Cgroupns: c.String("cgroupns"),
- // CgroupParent: c.String("cgroup-parent"),
- // CgroupMode: cgroupMode,
//}
//
//userns := &cc.UserConfig{