Role lxc_hosts for OpenStack-Ansible
Go to file
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
defaults systemd: Set a higher DefaultTasksMax value 2017-06-22 08:51:20 +01:00
doc Use https instead of http for git.openstack.org 2017-02-06 11:46:46 +08:00
examples [DOCS] Create separate example playbook file 2016-08-11 20:21:22 -05:00
files tasks: Set systemd installation prefix 2017-04-25 14:56:33 +01:00
handlers systemd: Set a higher DefaultTasksMax value 2017-06-22 08:51:20 +01:00
meta Add SUSE support 2017-04-25 14:56:33 +01:00
releasenotes Revert "Use LXC v2.0.6 on CentOS" 2017-06-14 13:26:41 +00:00
tasks systemd: Set a higher DefaultTasksMax value 2017-06-22 08:51:20 +01:00
templates Fix container bridge networking on SUSE 2017-05-08 11:24:12 +01:00
tests Use zuul-cloner for tests repo in OpenStack-CI 2017-05-04 16:49:39 +01:00
vars Revert "Use LXC v2.0.6 on CentOS" 2017-06-14 13:26:41 +00:00
.gitignore Add SUSE support 2017-04-25 14:56:33 +01:00
.gitreview New git dotfiles for independant repository 2015-11-25 20:56:11 +00:00
bindep.txt Add SUSE support 2017-04-25 14:56:33 +01:00
CONTRIBUTING.rst [DOCS] - Removing tags: and category: 2016-08-18 15:16:58 -04:00
LICENSE IRR for lxc_host 2015-11-03 04:22:57 -06:00
manual-test.rc Use centralised test scripts 2016-09-27 16:47:07 +01:00
README.rst Show team and repo badges on README 2016-11-25 16:04:01 +01:00
run_tests.sh Add SUSE support 2017-04-25 14:56:33 +01:00
setup.cfg Changed the home-page link 2016-10-05 12:49:57 +05:30
setup.py Updated from global requirements 2017-03-02 11:51:17 +00:00
test-requirements.txt Updated from global requirements 2017-06-12 19:45:12 +00:00
tox.ini Ensure that role tests pin pip/setuptools/wheel 2017-06-04 11:18:39 +01:00
Vagrantfile Vagrantfile: Switch to openSUSE Leap 42.2 2017-05-08 11:23:35 +01:00

Team and repository tags

image

OpenStack-Ansible LXC hosts

Ansible role that configures a host for running LXC containers.

Documentation for the project can be found at:

http://docs.openstack.org/developer/openstack-ansible-lxc_hosts

The project home is at:

http://launchpad.net/openstack-ansible