aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorDave Walker (Daviey) <email@daviey.com>2016-06-26 01:07:28 +0100
committerDave Walker (Daviey) <email@daviey.com>2016-06-26 01:17:34 +0100
commit2a2a86ac43f86ee698ce080486612984f67d9ea0 (patch)
treee5f9bc59b43e85d0b418eece7bf2e18e588b9a95
parentb6e51e9531caaa6bda58de5c91e288763c588de2 (diff)
downloadkolla-2a2a86ac43f86ee698ce080486612984f67d9ea0.tar.gz
kolla-2a2a86ac43f86ee698ce080486612984f67d9ea0.zip
glance-*, fix rabbit config with ceilometer
Currently, if ceilometer is enabled with glance then the rabbitmq is non-functional, causing various glance failures including image upload. This is caused because: The generated config fails to have a carriage return at the end of the rabbit_host line, causing the following line to be added to this entry. rabbit_host is used rather than rabbit_hosts, where the fromer expects a string, rather than the list that is provided. This also adds rabbit HA support, to be in-line with the other services using rabbitmq. This is resolved, by pushing the rabbit_hosts entry to be last, meaning that a carriage return is not required. Change-Id: I89f26d542565b98025fd9b84fc4beb5cbed364e5 Closes-Bug: 1596244 Signed-off-by: Dave Walker (Daviey) <email@daviey.com>
-rw-r--r--ansible/roles/glance/templates/glance-api.conf.j23
-rw-r--r--ansible/roles/glance/templates/glance-registry.conf.j23
2 files changed, 4 insertions, 2 deletions
diff --git a/ansible/roles/glance/templates/glance-api.conf.j2 b/ansible/roles/glance/templates/glance-api.conf.j2
index 8ece2f91a..f81a7296b 100644
--- a/ansible/roles/glance/templates/glance-api.conf.j2
+++ b/ansible/roles/glance/templates/glance-api.conf.j2
@@ -55,9 +55,10 @@ filesystem_store_datadir = /var/lib/glance/images/
driver = messagingv2
[oslo_messaging_rabbit]
-rabbit_host = {% for host in groups['rabbitmq'] %}{{ hostvars[host]['ansible_' + hostvars[host]['api_interface']]['ipv4']['address'] }}:{{ rabbitmq_port }}{% if not loop.last %},{% endif %}{% endfor %}
rabbit_userid = {{ rabbitmq_user }}
rabbit_password = {{ rabbitmq_password }}
+rabbit_ha_queues = true
+rabbit_hosts = {% for host in groups['rabbitmq'] %}{{ hostvars[host]['ansible_' + hostvars[host]['api_interface']]['ipv4']['address'] }}:{{ rabbitmq_port }}{% if not loop.last %},{% endif %}{% endfor %}
{% else %}
driver = noop
{% endif %}
diff --git a/ansible/roles/glance/templates/glance-registry.conf.j2 b/ansible/roles/glance/templates/glance-registry.conf.j2
index 49d35ee02..55146ac87 100644
--- a/ansible/roles/glance/templates/glance-registry.conf.j2
+++ b/ansible/roles/glance/templates/glance-registry.conf.j2
@@ -34,9 +34,10 @@ flavor = keystone
driver = messagingv2
[oslo_messaging_rabbit]
-rabbit_host = {% for host in groups['rabbitmq'] %}{{ hostvars[host]['ansible_' + hostvars[host]['api_interface']]['ipv4']['address'] }}:{{ rabbitmq_port }}{% if not loop.last %},{% endif %}{% endfor %}
rabbit_userid = {{ rabbitmq_user }}
rabbit_password = {{ rabbitmq_password }}
+rabbit_ha_queues = true
+rabbit_hosts = {% for host in groups['rabbitmq'] %}{{ hostvars[host]['ansible_' + hostvars[host]['api_interface']]['ipv4']['address'] }}:{{ rabbitmq_port }}{% if not loop.last %},{% endif %}{% endfor %}
{% else %}
driver = noop
{% endif %}