openstack-ansible-os_swift/templates/container-server-replicator.conf.j2
Andy McCrae 9578aa5fd7 Ensure storage/replication_ip are uniform
We need to ensure the swift services are listening on the same IP and
port as the ring is setup for. Currently we calculate these values in
different ways, which leads to the possibility that the ring is setup
for ports and IPs that the services are not listening on.

This change ensures this by calculating the storage and replication
addresses within the role - whilst still accepting overrides from
outside the role. This ensures functionality does not change, but that
it is now not possible for the swift services to not listen on the
ports/IPs defined in the ring.

As part of this change we move to set "swift_dedicated_replication"
based on whether the storage and replication addresses are the same,
rather than the specified network. This means you can run a dedicated
replication config by configuring the services, which was possible to
configure, but again would have meant the services and ring were not
configured in the same way. This is required to ensure uniformity.

Finally - we remove the ability to set a storage_port or repl_port
within the swift_vars, this was a setting that would never work in it's
current implementation. The storage/repl_port would depend entirely on
which swift service was in use, and can not be set in such a blanket
fashion. Since this was a completely not working funcitonality it has
now been removed.

Change-Id: Ibe5330cdca7fd81f379b80dc55ad06529ce4d580
2016-09-26 11:23:15 +01:00

29 lines
749 B
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_container_port }}
devices = {{ swift_vars.mount_point | default(swift.mount_point) }}
workers = {{ swift_server_replicator_workers | default(api_threads) }}
log_facility = LOG_LOCAL3
{% include "statsd.j2" %}
[pipeline:main]
pipeline = container-server
[app:container-server]
use = egg:swift#container
replication_server = True
[container-replicator]
log_facility = LOG_LOCAL3
reclaim_age = {{ reclaim_age | default(604800) }}
[container-auditor]
log_facility = LOG_LOCAL3