Let rsync max_connections be set by variables

Setup variables for the account, object & container rsync max
connections.

Defaults to the current default of 2, and allows it to be specified on a
per service (account, object, container) basis.

Change-Id: I837f7ddabbc012d1607c897bb45ae58ad9f8540a
This commit is contained in:
Andy McCrae 2016-03-16 16:22:47 +00:00
parent 0b320c208f
commit 82a961ed18
2 changed files with 9 additions and 3 deletions

View File

@ -199,6 +199,12 @@ swift: {}
# index: 0
# default: True
# Set rsync max_connections vars
swift_max_rsync_connections: 2
swift_account_max_rsync_connections: "{{ swift_max_rsync_connections }}"
swift_container_max_rsync_connections: "{{ swift_max_rsync_connections }}"
swift_object_max_rsync_connections: "{{ swift_max_rsync_connections }}"
# swift packages that must be installed before anything else
swift_requires_pip_packages:
- virtualenv

View File

@ -7,19 +7,19 @@ pid file = /var/run/rsyncd.pid
address = {{ swift_replication_address }}
[account]
max connections = 2
max connections = {{ swift_account_max_rsync_connections }}
path = {{ swift_vars.mount_point | default(swift.mount_point) }}
read only = false
lock file = /var/lock/account.lock
[container]
max connections = 2
max connections = {{ swift_container_max_rsync_connections }}
path = {{ swift_vars.mount_point | default(swift.mount_point) }}
read only = false
lock file = /var/lock/container.lock
[object]
max connections = 2
max connections = {{ swift_object_max_rsync_connections }}
path = {{ swift_vars.mount_point | default(swift.mount_point) }}
read only = false
lock file = /var/lock/object.lock