From 2edb1b1a4d5aa8e63a506e2a9506c42c75f51379 Mon Sep 17 00:00:00 2001 From: Kevin Carter Date: Thu, 7 Feb 2019 22:32:47 +0000 Subject: [PATCH] Correct notification driver The notification driver setup was resulting in the driver and connection string on the same line. This is caused by the case statement and how jinja formats the template when a case statement is present. This change modifies how the driver string is created using a ternary, which will eliminate the case statement and render the value of the diver correctly. Change-Id: If361de5d4112a9e7235972dc7bc5e857c68fef06 Signed-off-by: Kevin Carter --- templates/glance-api.conf.j2 | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/templates/glance-api.conf.j2 b/templates/glance-api.conf.j2 index 197ea1bd..463e0228 100644 --- a/templates/glance-api.conf.j2 +++ b/templates/glance-api.conf.j2 @@ -71,7 +71,7 @@ rabbit_notification_exchange = glance rabbit_notification_topic = notifications [oslo_messaging_notifications] -driver = {% if glance_ceilometer_enabled %}messagingv2{% else %}noop{% endif %} +driver = {{ (glance_ceilometer_enabled | bool) | ternary('messagingv2', 'noop') }} transport_url = {{ glance_oslomsg_notify_transport }}://{% for host in glance_oslomsg_notify_servers.split(',') %}{{ glance_oslomsg_notify_userid }}:{{ glance_oslomsg_notify_password }}@{{ host }}:{{ glance_oslomsg_notify_port }}{% if not loop.last %},{% else %}/{{ glance_oslomsg_notify_vhost }}{% if glance_oslomsg_notify_use_ssl | bool %}?ssl=1{% else %}?ssl=0{% endif %}{% endif %}{% endfor %} [paste_deploy]