diff options
author | Daniel J Walsh <dwalsh@redhat.com> | 2020-04-21 14:27:21 -0400 |
---|---|---|
committer | Daniel J Walsh <dwalsh@redhat.com> | 2020-04-21 16:00:45 -0400 |
commit | 9d7b5947b9ff661433c4bedc018f5368830abbe6 (patch) | |
tree | a8052869b2da7299b42e10ca6530f7cc88eb5783 /cmd/podman/common/specgen.go | |
parent | f7fe424e19c6d95da6366be966457640bbcfd2e6 (diff) | |
download | podman-9d7b5947b9ff661433c4bedc018f5368830abbe6.tar.gz podman-9d7b5947b9ff661433c4bedc018f5368830abbe6.tar.bz2 podman-9d7b5947b9ff661433c4bedc018f5368830abbe6.zip |
Fix handling of CGroupsParent and CGroupsMode
Signed-off-by: Daniel J Walsh <dwalsh@redhat.com>
Diffstat (limited to 'cmd/podman/common/specgen.go')
-rw-r--r-- | cmd/podman/common/specgen.go | 7 |
1 files changed, 3 insertions, 4 deletions
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{ |