From f1b2eed3eb89f19acf543782c621edb6715ad6d5 Mon Sep 17 00:00:00 2001 From: Andy Smith Date: Thu, 20 Sep 2018 11:38:06 -0400 Subject: [PATCH] Update messaging notification configuration This patch removes the conditional inclusion of the notification section of the service configuration. This ensures that oslo.messaging notifications use the correct transport for deployments that have separate rpc and notify messaging backends. For example, if the transport_url is not provided in the notification section of the service configuration, the transport_url specified in the default section will be used instead. This patch conditionally selects the notifier driver. The noop driver will be selected when notification publishing is disabled. The messagingv2 driver is selected when notification publishing is enabled. Change-Id: I65ef897e78b5fb1c9ff6bb3d31cb6aa9e0c8429e --- tasks/main.yml | 1 - templates/cinder.conf.j2 | 4 +--- 2 files changed, 1 insertion(+), 4 deletions(-) diff --git a/tasks/main.yml b/tasks/main.yml index 5f77e348..87e4ef75 100644 --- a/tasks/main.yml +++ b/tasks/main.yml @@ -87,7 +87,6 @@ _oslomsg_notify_password: "{{ cinder_oslomsg_notify_password }}" _oslomsg_notify_vhost: "{{ cinder_oslomsg_notify_vhost }}" _oslomsg_notify_transport: "{{ cinder_oslomsg_notify_transport }}" - _oslomsg_configure_notify: "{{ cinder_ceilometer_enabled | bool }}" tags: - common-mq - cinder-config diff --git a/templates/cinder.conf.j2 b/templates/cinder.conf.j2 index 75a25383..05149037 100644 --- a/templates/cinder.conf.j2 +++ b/templates/cinder.conf.j2 @@ -108,11 +108,9 @@ connection = mysql+pymysql://{{ cinder_galera_user }}:{{ cinder_container_mysql_ [oslo_messaging_rabbit] ssl = {{ cinder_oslomsg_rpc_use_ssl }} -{% if cinder_ceilometer_enabled %} [oslo_messaging_notifications] -driver = messagingv2 +driver = {% if cinder_ceilometer_enabled %}messagingv2{% else %}noop{% endif %} 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 %} -{% endif %} [oslo_concurrency] lock_path = {{ cinder_lock_path }}