![Andy McCrae](/assets/img/avatar_default.png)
The statsd.j2 include approach is great, but it is hitting an ansible bug with Jinja2==2.9.5 which hasn't been fixed with Ansible and doens't seem to be fixed anytime soon. Here is an example bug: https://github.com/ansible/ansible/issues/20494 This patch also refactors the statsd.j2 import parts, a lot of if/else statements were not required. Change-Id: Ib78ac0a8891874b1c2e777fac8f3fb89304e6872
74 lines
2.2 KiB
Django/Jinja
74 lines
2.2 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_storage_address }}
|
|
bind_port = {{ swift_object_port }}
|
|
workers = {{ swift_object_server_workers | default(api_threads) }}
|
|
|
|
user = {{ swift_system_user_name }}
|
|
swift_dir = /etc/swift
|
|
devices = {{ swift_vars.mount_point | default(swift.mount_point) }}
|
|
log_facility = LOG_LOCAL4
|
|
|
|
{% 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 %}
|
|
|
|
disable_fallocate = {{ swift_object_disable_fallocate }}
|
|
fallocate_reserve = {{ swift_object_fallocate_reserve }}
|
|
|
|
[pipeline:main]
|
|
pipeline = healthcheck recon object-server
|
|
|
|
[app:object-server]
|
|
use = egg:swift#object
|
|
log_facility = LOG_LOCAL4
|
|
mb_per_sync = 64
|
|
|
|
[filter:healthcheck]
|
|
use = egg:swift#healthcheck
|
|
|
|
[filter:recon]
|
|
use = egg:swift#recon
|
|
log_facility = LOG_LOCAL4
|
|
recon_cache_path = /var/cache/swift
|
|
recon_lock_path = /var/lock
|
|
|
|
{% if not swift_dedicated_replication %}
|
|
[object-replicator]
|
|
log_facility = LOG_LOCAL4
|
|
concurrency = 6
|
|
reclaim_age = {{ reclaim_age | default(604800) }}
|
|
{% if swift_rsync_module_per_drive %}
|
|
rsync_module = {replication_ip}::object_{device}
|
|
{% endif %}
|
|
|
|
[object-auditor]
|
|
log_facility = LOG_LOCAL4
|
|
|
|
[object-reconstructor]
|
|
log_facility = LOG_LOCAL4
|
|
concurrency = 6
|
|
reclaim_age = {{ reclaim_age | default(604800) }}
|
|
{% endif %}
|
|
|
|
[object-updater]
|
|
log_facility = LOG_LOCAL4
|
|
concurrency = 3
|
|
concurrency = 3
|
|
node_timeout = 60
|
|
conn_timeout = 5
|
|
|
|
[filter:xprofile]
|
|
use = egg:swift#xprofile
|