Browse Source

[USSURI-ONLY] Add new parameter: pids_limit

The default PID limit in a container is set to 4096. This limit might be
reached in a nova_libvirt container, after launching about 150 VMs.

Change-Id: Iebad9919caf805715da9268f9ee8a40b4392642a
Related: https://bugzilla.redhat.com/show_bug.cgi?id=1871885
Closes-Bug: #1892817
(cherry picked from commit 368827e907)
changes/06/748106/1
Cédric Jeanneret 1 month ago
committed by Cédric Jeanneret (Tengu)
parent
commit
ed2c015ab3
2 changed files with 4 additions and 1 deletions
  1. +1
    -0
      paunch/builder/podman.py
  2. +3
    -1
      paunch/tests/test_builder_podman.py

+ 1
- 0
paunch/builder/podman.py View File

@@ -67,6 +67,7 @@ class PodmanBuilder(base.BaseBuilder):
self.string_arg(cconfig, cmd, 'ipc', '--ipc')
self.string_arg(cconfig, cmd, 'pid', '--pid')
self.string_arg(cconfig, cmd, 'uts', '--uts')
self.string_arg(cconfig, cmd, 'pids_limit', '--pids-limit')
# TODO(sbaker): implement ulimits property, deprecate this ulimit
# property
for u in cconfig.get('ulimit', []):


+ 3
- 1
paunch/tests/test_builder_podman.py View File

@@ -41,6 +41,7 @@ class TestPodmanBuilder(base.TestBaseBuilder):
'cap_add': ['SYS_ADMIN', 'SETUID'],
'cap_drop': ['NET_RAW'],
'hostname': 'foohostname',
'pids_limit': '1024',
'extra_hosts': [
'foohost:127.0.0.1',
'barhost:127.0.0.2'
@@ -56,7 +57,8 @@ class TestPodmanBuilder(base.TestBaseBuilder):
'--conmon-pidfile=/var/run/one.pid',
'--detach=true', '--env-file=/tmp/foo.env',
'--net=host', '--ipc=host', '--pid=container:bar',
'--uts=host', '--privileged=true', '--user=bar',
'--uts=host', '--pids-limit=1024',
'--privileged=true', '--user=bar',
'--log-opt=tag={{.ImageName}}/{{.Name}}/{{.ID}}',
'--cpu-shares=600',
'--memory=1G',


Loading…
Cancel
Save