summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--cmd/podman/common/specgen.go6
-rw-r--r--test/e2e/run_test.go1
2 files changed, 3 insertions, 4 deletions
diff --git a/cmd/podman/common/specgen.go b/cmd/podman/common/specgen.go
index b90030f7f..fda11c0af 100644
--- a/cmd/podman/common/specgen.go
+++ b/cmd/podman/common/specgen.go
@@ -119,13 +119,13 @@ func getIOLimits(s *specgen.SpecGenerator, c *ContainerCLIOpts, args []string) (
func getPidsLimits(s *specgen.SpecGenerator, c *ContainerCLIOpts, args []string) (*specs.LinuxPids, error) {
pids := &specs.LinuxPids{}
hasLimits := false
+ if c.CGroupsMode == "disabled" && c.PIDsLimit > 0 {
+ return nil, nil
+ }
if c.PIDsLimit > 0 {
pids.Limit = c.PIDsLimit
hasLimits = true
}
- if c.CGroupsMode == "disabled" && c.PIDsLimit > 0 {
- s.ResourceLimits.Pids.Limit = -1
- }
if !hasLimits {
return nil, nil
}
diff --git a/test/e2e/run_test.go b/test/e2e/run_test.go
index df97ddf69..92db37096 100644
--- a/test/e2e/run_test.go
+++ b/test/e2e/run_test.go
@@ -937,7 +937,6 @@ USER mail`
})
It("podman run with cgroups=disabled runs without cgroups", func() {
- Skip(v2fail)
SkipIfRemote()
SkipIfRootless()
// Only works on crun