4aa96a832c
We don't setup hosts entries for replication addresses on storage hosts, by default. Rsync is performing a reverse lookup on each rsync, and failing. We should turn this reverse lookup off by default, but allow this to be set to True. This PR adds the "swift_rsync_reverse_lookup" boolean which is defaulted to false. Change-Id: Ie98113fd71a70ce9c74c3812046be6959b9a353f
65 lines
2.3 KiB
Django/Jinja
65 lines
2.3 KiB
Django/Jinja
# {{ ansible_managed }}
|
|
|
|
uid = {{ swift_system_user_name }}
|
|
gid = {{ swift_system_group_name }}
|
|
log file = /var/log/rsyncd.log
|
|
pid file = /var/run/rsyncd.pid
|
|
reverse lookup = {{ swift_rsync_reverse_lookup | bool }}
|
|
address = {{ swift_replication_address }}
|
|
|
|
[account]
|
|
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 = {{ swift_container_max_rsync_connections }}
|
|
path = {{ swift_vars.mount_point | default(swift.mount_point) }}
|
|
read only = false
|
|
lock file = /var/lock/container.lock
|
|
|
|
{% if swift_rsync_module_per_drive %}
|
|
{### Set up per drive rsync modules #}
|
|
{### Lets get the default groups for drives and find the default storage_policy #}
|
|
{% set def_groups = [ 'account', 'container' ] %}
|
|
{% for policy in swift.storage_policies %}
|
|
{% if policy.policy.default is defined and policy.policy.default == True %}
|
|
{% set _update = def_groups.append(policy.policy.name) %}
|
|
{% endif %}
|
|
{% endfor %}
|
|
{### swift_vars needs to exist for swift_vars[setting] checks to work #}
|
|
{% if swift_vars is not defined %}
|
|
{% set swift_vars = {} %}
|
|
{% endif %}
|
|
{% set drives = swift_vars.drives | default(swift.drives | default([])) %}
|
|
{### Loop through the drives to determine if they are in the object group #}
|
|
{% for drive in drives %}
|
|
{% set devAdded = False %}
|
|
{### Check if groups is defined per host or drive #}
|
|
{% set groups = drives.groups | default(swift_vars.groups | default(swift.groups | default(def_groups))) %}
|
|
{% for group in groups %}
|
|
{% if group not in ['account', 'container'] %}
|
|
{### We only want to add a device once so check if it was added already #}
|
|
{% if not devAdded | bool %}
|
|
[object_{{ drive.name }}]
|
|
max connections = {{ swift_object_max_rsync_connections }}
|
|
path = {{ swift_vars.mount_point | default(swift.mount_point) }}
|
|
read only = false
|
|
lock file = /var/lock/object_{{ drive.name }}.lock
|
|
|
|
{% endif %}
|
|
{% set devAdded = True %}
|
|
{% endif %}
|
|
{% endfor %}
|
|
{% endfor %}
|
|
{% else %}
|
|
[object]
|
|
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
|
|
|
|
{% endif %}
|
|
&include /etc/rsync.d
|