openstack-ansible-os_swift/templates/object-server-replicator.conf.j2
Matthew Thode 3e151d97ad
split templates to work around configparser bug
Move the percent character to the template from the string to allow
setting either % or %% as needed to work around the bug linked below.
This requires each service 'family' to have two versions of it's config
file.

Bug: https://bugs.launchpad.net/swift/+bug/1872553

Change-Id: I68f276224c51d5682d77123eae697767fadf9b19
Signed-off-by: Matthew Thode <mthode@mthode.org>
2020-04-16 13:49:01 -05:00

45 lines
1.6 KiB
Django/Jinja

# {{ ansible_managed }}
{% set _api_threads = ansible_processor_vcpus|default(2) // 2 %}
{% set api_threads = _api_threads if _api_threads > 0 else 1 %}
[DEFAULT]
# Disable stderr logging
use_stderr = False
bind_ip = {{ swift_replication_address }}
bind_port = {{ swift_object_port }}
devices = {{ swift_vars.mount_point | default(swift.mount_point) }}
workers = {{ swift_object_replicator_workers | default(api_threads) }}
{% set _statsd_host = swift_vars.statsd_host | default(swift.statsd_host | default(statsd_host | default(False))) %}
{% if _statsd_host | bool %}
log_statsd_host = {{ _statsd_host }}
log_statsd_port = {{ swift_vars.statsd_port | default(swift.statsd_port | default(statsd_port)) }}
log_statsd_default_sample_rate = {{ swift_vars.statsd_default_sample_rate | default(swift.statsd_default_sample_rate | default(statsd_default_sample_rate)) }}
log_statsd_sample_rate_factor = {{ swift_vars.statsd_sample_rate_factor | default(swift.statsd_sample_rate_factor | default(statsd_sample_rate_factor))}}
log_statsd_metric_prefix = {{ swift_vars.statsd_metric_prefix | default(swift.statsd_metric_prefix | default(inventory_hostname)) }}
{% endif %}
[pipeline:main]
pipeline = object-server
[app:object-server]
use = egg:swift#object
replication_server = True
[object-replicator]
concurrency = 6
reclaim_age = {{ reclaim_age | default(604800) }}
{% if swift_rsync_module_per_drive %}
rsync_module = {replication_ip}::object_{device}
{% endif %}
#TODO(jamesdenton): Remove config section when no longer required for service to start
[object-auditor]
[object-reconstructor]
concurrency = 6
reclaim_age = {{ reclaim_age | default(604800) }}
[object-auditor]