From d9dfc53a4a401886b5619d81a1feaf72f797072a Mon Sep 17 00:00:00 2001 From: Nate Potter Date: Thu, 3 Mar 2016 16:22:55 +0000 Subject: [PATCH] Check for AODH host before adding alarm_connection Currently the os_ceilometer role will configure ceilometer.conf to include a line in the [databases] section for alarm_connection no matter what, and it will default to looking for the aodh user in mongodb serving at localhost. If the user installs ceilometer but not aodh, this will break the ceilometer service as the API will not start up while it times out looking for the unconfigured database. This patch ensures that there are hosts configured for AODH before adding that line to the conf file. Change-Id: If27e19e7c6bb2d20e7b0093a8d4e29c30952fb14 Closes-bug: #1549426 --- templates/ceilometer.conf.j2 | 2 ++ 1 file changed, 2 insertions(+) diff --git a/templates/ceilometer.conf.j2 b/templates/ceilometer.conf.j2 index 71f657c9..167ef530 100644 --- a/templates/ceilometer.conf.j2 +++ b/templates/ceilometer.conf.j2 @@ -77,7 +77,9 @@ messaging_urls = rabbit://{{ keystone_rabbitmq_userid }}:{{ keystone_rabbitmq_pa [database] metering_connection = {{ ceilometer_connection_string }} event_connection = {{ ceilometer_connection_string }} +{% if groups['aodh_all'] is defined and groups['aodh_all'] | length > 0 %} alarm_connection = {{ aodh_connection_string }} +{% endif %} [keystone_authtoken] insecure = {{ keystone_service_internaluri_insecure | bool }}