summaryrefslogtreecommitdiff
path: root/cmd/podman/common/create.go
diff options
context:
space:
mode:
authorDaniel J Walsh <dwalsh@redhat.com>2020-07-06 14:14:48 -0400
committerDaniel J Walsh <dwalsh@redhat.com>2020-07-06 14:14:48 -0400
commitc4023a9302c81f04865646d765caf58ccf556cae (patch)
treef957873174291cfc4380478c43cf265757cbaf0c /cmd/podman/common/create.go
parent1a60550bef976a57777c75e055ad35ff8cf87f23 (diff)
downloadpodman-c4023a9302c81f04865646d765caf58ccf556cae.tar.gz
podman-c4023a9302c81f04865646d765caf58ccf556cae.tar.bz2
podman-c4023a9302c81f04865646d765caf58ccf556cae.zip
Pids-limit should only be set if the user set it
Currently we are sending over pids-limits from the user even if they never modified the defaults. The pids limit should be set at the server side unless modified by the user. This issue has led to failures on systems that were running with cgroups V1. Signed-off-by: Daniel J Walsh <dwalsh@redhat.com>
Diffstat (limited to 'cmd/podman/common/create.go')
-rw-r--r--cmd/podman/common/create.go3
1 files changed, 1 insertions, 2 deletions
diff --git a/cmd/podman/common/create.go b/cmd/podman/common/create.go
index b7940fb87..ee7f957cc 100644
--- a/cmd/podman/common/create.go
+++ b/cmd/podman/common/create.go
@@ -329,8 +329,7 @@ func GetCreateFlags(cf *ContainerCLIOpts) *pflag.FlagSet {
"pid", "",
"PID namespace to use",
)
- createFlags.Int64Var(
- &cf.PIDsLimit,
+ createFlags.Int64(
"pids-limit", containerConfig.PidsLimit(),
"Tune container pids limit (set 0 for unlimited, -1 for server defaults)",
)