diff options
| author | Steven Dake <stdake@cisco.com> | 2016-04-15 16:42:36 -0700 |
|---|---|---|
| committer | Steven Dake <stdake@cisco.com> | 2016-04-15 17:54:49 -0700 |
| commit | aebb1997a1fe0267906905e931c83bf20dd01b23 (patch) | |
| tree | f6669e4fc6a6dac46184461b26a59c6f416f6e74 | |
| parent | a4104c2aecea4aa50638661dbf1cc3ecdd4dd63a (diff) | |
| download | kolla-aebb1997a1fe0267906905e931c83bf20dd01b23.tar.gz kolla-aebb1997a1fe0267906905e931c83bf20dd01b23.zip | |
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
| -rw-r--r-- | ansible/roles/cinder/templates/cinder.conf.j2 | 4 |
1 files changed, 3 insertions, 1 deletions
diff --git a/ansible/roles/cinder/templates/cinder.conf.j2 b/ansible/roles/cinder/templates/cinder.conf.j2 index 313f99ef8..033dcfa77 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 }} |
