Set a higher PIDs limit for nova_libvirt container

The default limit is set to 4096. This can be reached with about 150
VMs, and therefore can lead to a situation where you're unable to start
new VMs on a compute node.

This patch integrates the modifications made by Rabi in his own
(abandonned) patch.

Note: this patch needs to be backported down to stable/train. The value
of Depends-On will need to be updated in order to point to another
patch, in paunch repository: https://review.opendev.org/747831

Change-Id: Ic414fc8826e4164ed679fbe22b82acf39c9ed7e0
Co-Authored-By: Rabi Mishra <ramishra@redhat.com>
Related: https://bugzilla.redhat.com/show_bug.cgi?id=1871885
Closes-Bug: #1892817
Depends-On: https://review.opendev.org/747831
(cherry picked from commit 9d71882a42)
(cherry picked from commit daff4688fb)
This commit is contained in:
Cédric Jeanneret 2020-08-25 08:13:55 +02:00
parent bd5ffcc5ac
commit 94ba270906
2 changed files with 12 additions and 0 deletions

View File

@ -16,6 +16,11 @@ parameters:
default: ['nofile=131072', 'nproc=126960']
description: ulimit for Nova Libvirt Container
type: comma_delimited_list
ContainerNovaLibvirtPidsLimit:
default: 65536
description: Tune nova_libvirt container PID limit (set to 0 for unlimited)
(defaults to 65536)
type: number
ServiceData:
default: {}
description: Dictionary packing service data
@ -693,6 +698,7 @@ outputs:
ulimit: {get_param: ContainerNovaLibvirtUlimit}
net: host
pid: host
pids_limit: {get_param: ContainerNovaLibvirtPidsLimit}
privileged: true
security_opt: label=disable
restart: always

View File

@ -0,0 +1,6 @@
---
features:
- |
Adds a new ContainerNovaLibvirtPidsLimit parameter in order to set the
PIDs limit for nova_libvirt container. Defaults to 65536, set to 0 for
unlimited.