Adjust file descriptor limit when systemd is used

Change-Id: I1039463e860e613f56fb2b813078d2c134f6b65d
Related-Bug: #1623164 
This commit is contained in:
Paulo Matias
2016年09月13日 19:14:28 -03:00
parent e533c25ce0
commit 716494ee86

View File

@@ -35,6 +35,18 @@
- rabbitmq-config
- rabbitmq-cluster
- name:Create rabbitmq systemd service config dir
file:
path:"/etc/systemd/system/rabbitmq-server.service.d"
state:"directory"
group:"root"
owner:"root"
mode:"0755"
when:
- pid1_name == "systemd"
tags:
- rabbitmq-config
- name:Create rabbitmq config
register:rabbit_config_changed
template:
@@ -47,6 +59,24 @@
tags:
- rabbitmq-config
- name:Apply resource limits (systemd)
register:rabbit_resource_limit_changed
template:
src:"limits.conf.j2"
dest:"/etc/systemd/system/rabbitmq-server.service.d/limits.conf"
when:
- pid1_name == "systemd"
tags:
- rabbitmq-config
- name:Reload the systemd daemon
command:"systemctl daemon-reload"
when:
- pid1_name == "systemd"
- rabbit_resource_limit_changed|changed
tags:
- rabbitmq-config
- include:rabbitmq_restart.yml
when:rabbit_config_changed|changed or rabbitmq_plugin|changed or rabbitmq_queue_mirror|changed

4
templates/limits.conf.j2 Normal file
View File

@@ -0,0 +1,4 @@
# {{ ansible_managed }}
[Service]
LimitNOFILE={{ rabbitmq_ulimit }}
Reference in New Issue
openstack/openstack-ansible-rabbitmq_server
Block a user
Blocking a user prevents them from interacting with repositories, such as opening or commenting on pull requests or issues. Learn more about blocking a user.

The note is not visible to the blocked user.