Converted the limits config to use systemd

The old limits config was still running on the upstart setup. While the
directories within the ubuntu exist they are ignored in Ubuntu 16.04 and
CentOS 7. This change removes the old upstart config and adds the
required systemd config.

Change-Id: Ic75d6cfe32678f4205d6f8ea991f393526d0a082
Signed-off-by: Kevin Carter <kevin.carter@rackspace.com>
This commit is contained in:
Kevin Carter 2017-01-13 17:38:35 -06:00 committed by Kevin Carter (cloudnull)
parent ed41f565a0
commit 195621208a
3 changed files with 2 additions and 17 deletions

View File

@ -43,7 +43,6 @@
with_dict: "{{ swift_services }}"
when: inventory_hostname in groups[item.value.group]
- name: Create tmpfiles.d entry
template:
src: "swift-systemd-tmpfiles.j2"
@ -65,3 +64,4 @@
when: inventory_hostname in groups[item.value.group]
notify:
- Reload systemd daemon

View File

@ -90,19 +90,3 @@
mode: "0755"
owner: "root"
group: "root"
- name: Configure soft file limits
lineinfile:
dest: "/etc/security/limits.conf"
regexp: "^{{ swift_system_user_name }}.*soft.*nofile.*"
state: "present"
line: "{{ swift_system_user_name }}\tsoft\tnofile\t\t{{ swift_soft_open_file_limits }}"
insertbefore: "^# End of file"
- name: Configure hard file limits
lineinfile:
dest: "/etc/security/limits.conf"
regexp: "^{{ swift_system_user_name }}.*hard.*nofile.*"
state: "present"
line: "{{ swift_system_user_name }}\thard\tnofile\t\t{{ swift_hard_open_file_limits }}"
insertbefore: "^# End of file"

View File

@ -8,6 +8,7 @@ After=network.target
Type=simple
User={{ swift_system_user_name }}
Group={{ swift_system_group_name }}
LimitNOFILE={{ swift_soft_open_file_limits }}:{{ swift_hard_open_file_limits }}
{% if swift_pypy_enabled %}
{% if swift_pypy_gc_min is defined %}