Add options for configuring file limits in swift
Options have been added to allow a deployer to control the hard, soft, and fs.file-max limits on swift specific nodes. Change-Id: Ia5dd51fa360745a9776d58d0bf49d8e1201d3139 Closes-Bug: #1595290 Signed-off-by: Kevin Carter <kevin.carter@rackspace.com>
This commit is contained in:
parent
5140edef3e
commit
022b62fc8d
@ -113,6 +113,11 @@ statsd_default_sample_rate: 1.0
|
|||||||
statsd_sample_rate_factor: 1.0
|
statsd_sample_rate_factor: 1.0
|
||||||
statsd_metric_prefix:
|
statsd_metric_prefix:
|
||||||
|
|
||||||
|
# Set the file limits
|
||||||
|
swift_hard_open_file_limits: 10240
|
||||||
|
swift_soft_open_file_limits: 4096
|
||||||
|
swift_max_file_limits: "{{ swift_hard_open_file_limits * 24 }}"
|
||||||
|
|
||||||
## Keystone authentication middleware
|
## Keystone authentication middleware
|
||||||
swift_keystone_auth_plugin: "password"
|
swift_keystone_auth_plugin: "password"
|
||||||
|
|
||||||
|
@ -0,0 +1,11 @@
|
|||||||
|
---
|
||||||
|
features:
|
||||||
|
- The ``os_swift`` role has 3 new variables that will allow a
|
||||||
|
deployer to change the hard, soft and fs.file-max limits. the
|
||||||
|
hard and soft limits are being added to the limits.conf file for
|
||||||
|
the swift system user. The fs.file-max settings are added to
|
||||||
|
storage hosts via kernel tuning. The new options are
|
||||||
|
``swift_hard_open_file_limits`` with a default of 10240
|
||||||
|
``swift_soft_open_file_limits`` with a default of 4096
|
||||||
|
``swift_max_file_limits`` with a default of 24 times the value
|
||||||
|
of ``swift_hard_open_file_limits``.
|
@ -109,3 +109,23 @@
|
|||||||
group: "root"
|
group: "root"
|
||||||
tags:
|
tags:
|
||||||
- swift-crond
|
- swift-crond
|
||||||
|
|
||||||
|
- 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"
|
||||||
|
tags:
|
||||||
|
- swift-config
|
||||||
|
|
||||||
|
- 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"
|
||||||
|
tags:
|
||||||
|
- swift-config
|
||||||
|
@ -26,6 +26,14 @@
|
|||||||
sysctl_set: yes
|
sysctl_set: yes
|
||||||
delegate_to: "{{ physical_host }}"
|
delegate_to: "{{ physical_host }}"
|
||||||
|
|
||||||
|
- name: "Set sysctl file-max"
|
||||||
|
sysctl:
|
||||||
|
name: "fs.file-max"
|
||||||
|
state: present
|
||||||
|
value: "{{ swift_max_file_limits }}"
|
||||||
|
sysctl_set: yes
|
||||||
|
delegate_to: "{{ physical_host }}"
|
||||||
|
|
||||||
- name: "Put /etc/rsyncd.conf in place"
|
- name: "Put /etc/rsyncd.conf in place"
|
||||||
template:
|
template:
|
||||||
src: "rsyncd.conf.j2"
|
src: "rsyncd.conf.j2"
|
||||||
|
Loading…
x
Reference in New Issue
Block a user