From aebb1997a1fe0267906905e931c83bf20dd01b23 Mon Sep 17 00:00:00 2001 From: Steven Dake Date: Fri, 15 Apr 2016 16:42:36 -0700 Subject: [PATCH] Make Cinder access glance in round robin fashion In the old rendition of this code, Cinder would attempt one access to glance, fail, and then cinder would fail. Now it accesses all servers in round robin fashion. Change-Id: I4759b0b586919b33f49b974312072820062f35c2 Closes-Bug: #1571128 --- ansible/roles/cinder/templates/cinder.conf.j2 | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/ansible/roles/cinder/templates/cinder.conf.j2 b/ansible/roles/cinder/templates/cinder.conf.j2 index 313f99ef84..033dcfa776 100644 --- a/ansible/roles/cinder/templates/cinder.conf.j2 +++ b/ansible/roles/cinder/templates/cinder.conf.j2 @@ -11,7 +11,9 @@ use_stderr = False enable_v1_api=false volume_name_template = %s -glance_api_servers = {{ internal_protocol }}://{{ kolla_internal_fqdn }}:{{ glance_api_port }} +glance_api_servers = {% for host in groups['glance-api'] %}{{ internal_protocol }}://{{ hostvars[host]['ansible_' + hostvars[host]['api_interface']]['ipv4']['address'] }}:{{ glance_api_port }}{% if not loop.last %},{% endif %}{% endfor %} + +glance_num_retries = {{ groups['glance-api'] | length }} glance_api_version = 2 os_region_name = {{ openstack_region_name }}