openstack-ansible-lxc_hosts/tasks
Markos Chandras 82406ad958 systemd: Set a higher DefaultTasksMax value
systemd-2.28 introduced DefaultTasksMax which is used to control
the default TasksMax= setting for services and scopes running on the
system. (TasksMax= is the primary setting that exposes the "pids"
cgroup controller on systemd and was introduced in the previous
systemd release.) The setting now defaults to 512, which means
services that are not explicitly configured otherwise will only
be able to create 512 processes or threads at maximum, from this
version on. However, the 512 limit seems too strict and sometimes
leads to failures like the following one on busy containers

==> opensuse422: fatal: [container3]: FAILED! => {"changed": false, "cmd": "/usr/sbin/rabbitmqctl -q -n '' list_user_permissions guest", "failed": true, "msg": "/usr/sbin/rabbitmqctl: fork: retry: No child processes\n/usr/lib64/rabbitmq/lib/rabbitmq_server-3.6.6//sbin/rabbitmq-env: fork: retry: Resource temporarily unavailable\n/usr/lib64/rabbitmq/lib/rabbitmq_server-3.6.6//sbin/rabbitmq-env: fork: retry: No child processes\n/usr/lib64/rabbitmq/lib/rabbitmq_server-3.6.6//sbin/rabbitmq-env: fork: retry: No child processes\nFailed to create thread: Resource temporarily unavailable (11)\r\nAborted (core dumped)", "rc": 134, "stderr": "/usr/sbin/rabbitmqctl: fork: retry: No child processes\n/usr/lib64/rabbitmq/lib/rabbitmq_server-3.6.6//sbin/rabbitmq-env: fork: retry: Resource temporarily unavailable\n/usr/lib64/rabbitmq/lib/rabbitmq_server-3.6.6//sbin/rabbitmq-env: fork: retry: No child processes\n/usr/lib64/rabbitmq/lib/rabbitmq_server-3.6.6//sbin/rabbitmq-env: fork: retry: No child processes\nFailed to create thread: Resource temporarily unavailable (11)\r\nAborted (core dumped)\n", "stderr_lines": ["/usr/sbin/rabbitmqctl: fork: retry: No child processes", "/usr/lib64/rabbitmq/lib/rabbitmq_server-3.6.6//sbin/rabbitmq-env: fork: retry: Resource temporarily unavailable", "/usr/lib64/rabbitmq/lib/rabbitmq_server-3.6.6//sbin/rabbitmq-env: fork: retry: No child processes", "/usr/lib64/rabbitmq/lib/rabbitmq_server-3.6.6//sbin/rabbitmq-env: fork: retry: No child processes", "Failed to create thread: Resource temporarily unavailable (11)", "Aborted (core dumped)"], "stdout": "", "stdout_lines": []}

and with messages in the kernel log such as

[ 2925.999021] cgroup: fork rejected by pids controller in /init.scope/lxc/container1
[ 3083.704049] cgroup: fork rejected by pids controller in /init.scope/lxc/container2

As we see, even though the /init.scope/lxc/container1 as pids.max set to 'max', the /init.scope
has pids.max set to 512 and in cgroups we always respect the lowest
boundary

~> cat /sys/fs/cgroup/pids/init.scope/lxc/container1/pids.max
max
~> cat /sys/fs/cgroup/pids/init.scope/pids.max
512

As a result of which, the 512 limit is enforced.

As such, we add a new variable to make this limit configurable. The
default limit has now been increased to 8192.

Change-Id: I8b4143aac84d4c795cab9c0d978c9a97ebea1793
2017-06-22 08:51:20 +01:00
..
lxc_cache_create.yml Remove unnecessary handler 2017-05-02 14:39:06 +01:00
lxc_cache_preparation_systemd_new.yml Fix machinectl set-limit 2017-04-24 16:15:55 +01:00
lxc_cache_preparation_systemd_old.yml Merge "tasks: Set systemd installation prefix" 2017-04-25 16:57:15 +00:00
lxc_cache_preparation.yml Configure proxy settings for machined 2017-04-22 00:57:27 +00:00
lxc_cache.yml Use correct variant var name 2017-04-20 14:52:16 +01:00
lxc_dnsmasq_cleanup.yml IRR for lxc_host 2015-11-03 04:22:57 -06:00
lxc_install_apt.yml Optimise the distro package installation 2017-06-08 15:44:23 +01:00
lxc_install_yum.yml Optimise the distro package installation 2017-06-08 15:44:23 +01:00
lxc_install_zypper.yml Optimise the distro package installation 2017-06-08 15:44:23 +01:00
lxc_install.yml Add SUSE support 2017-04-25 14:56:33 +01:00
lxc_kernel_tuning.yml Remove 'ignore_errors: true' in favor of 'failed_when: false' 2016-10-14 16:44:17 -05:00
lxc_net.yml Fix container bridge networking on SUSE 2017-05-08 11:24:12 +01:00
lxc_post_install.yml systemd: Set a higher DefaultTasksMax value 2017-06-22 08:51:20 +01:00
lxc_pre_install.yml Changed for lxc-host setup/build for multi-distro 2016-05-03 08:49:54 -05:00
lxc_selinux.yml Moving selinux bits into lxc_selinux 2017-03-09 09:34:20 +00:00
main.yml Use machinectl to manage image caches 2017-04-15 05:33:10 +00:00