From 38807bc2c7a81c18e556a4ff7696f7c28ad7ae02 Mon Sep 17 00:00:00 2001 From: Kevin Carter Date: Thu, 7 Feb 2019 22:32:43 +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: I94899d14906a0a4e51137dd066f25f8f0e0a2334 Signed-off-by: Kevin Carter --- templates/cinder.conf.j2 | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/templates/cinder.conf.j2 b/templates/cinder.conf.j2 index 71d5149e..c3d22014 100644 --- a/templates/cinder.conf.j2 +++ b/templates/cinder.conf.j2 @@ -109,7 +109,7 @@ connection = mysql+pymysql://{{ cinder_galera_user }}:{{ cinder_container_mysql_ ssl = {{ cinder_oslomsg_rpc_use_ssl }} [oslo_messaging_notifications] -driver = {% if cinder_ceilometer_enabled %}messagingv2{% else %}noop{% endif %} +driver = {{ (cinder_ceilometer_enabled | bool) | ternary('messagingv2', 'noop') }} transport_url = {{ cinder_oslomsg_notify_transport }}://{% for host in cinder_oslomsg_notify_servers.split(',') %}{{ cinder_oslomsg_notify_userid }}:{{ cinder_oslomsg_notify_password }}@{{ host }}:{{ cinder_oslomsg_notify_port }}{% if not loop.last %},{% else %}/{{ cinder_oslomsg_notify_vhost }}{% if cinder_oslomsg_notify_use_ssl | bool %}?ssl=1{% else %}?ssl=0{% endif %}{% endif %}{% endfor %} [oslo_concurrency]