Configure coordination in default for cinder when redis is enabled

Coordination is required for active-active cinder volume.

Change-Id: I9b26831fd951a24c483840a55824fae06ccbbf81
Closes-Bug: #1796615
This commit is contained in:
Jeffrey Zhang 2018-10-08 11:27:38 +08:00
parent a8d27f5a02
commit cf70bf23a5

View File

@ -212,3 +212,11 @@ connection_string = {{ osprofiler_backend_connection_string }}
[barbican]
auth_endpoint = {{ internal_protocol }}://{{ kolla_internal_fqdn }}:{{ keystone_public_port }}
{% endif %}
[coordination]
{% if enable_redis | bool %}
backend_url = redis://{% for host in groups['redis'] %}{% if host == groups['redis'][0] %}admin:{{ redis_master_password }}@{{ hostvars[host]['ansible_' + hostvars[host]['api_interface']]['ipv4']['address'] }}:{{ redis_sentinel_port }}?sentinel=kolla{% else %}&sentinel_fallback={{ hostvars[host]['ansible_' + hostvars[host]['api_interface']]['ipv4']['address'] }}:{{ redis_sentinel_port }}{% endif %}{% endfor %}&socket_timeout=60&retry_on_timeout=yes
{% elif enable_etcd | bool %}
# NOTE(jeffrey4l): python-etcd3 module do not support multi endpoint here.
backend_url = etcd3://{{ hostvars[groups['etcd'][0]]['ansible_' + hostvars[groups['etcd'][0]]['api_interface']]['ipv4']['address'] }}:{{ etcd_client_port }}
{% endif %}