From 83f815e07289b309c01c780cef92b8d1644388e9 Mon Sep 17 00:00:00 2001 From: Andy Smith Date: Thu, 20 Sep 2018 11:03:54 -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 isnot provided in the notification section of the service configuration, the transport_url specified in the default section will be used instead. Change-Id: I35f13c4cb14e51e5e164db12011d9c053f1260eb --- tasks/main.yml | 1 - templates/neutron.conf.j2 | 9 ++------- 2 files changed, 2 insertions(+), 8 deletions(-) diff --git a/tasks/main.yml b/tasks/main.yml index 33616370..1ac2256e 100644 --- a/tasks/main.yml +++ b/tasks/main.yml @@ -137,7 +137,6 @@ _oslomsg_notify_password: "{{ neutron_oslomsg_notify_password }}" _oslomsg_notify_vhost: "{{ neutron_oslomsg_notify_vhost }}" _oslomsg_notify_transport: "{{ neutron_oslomsg_notify_transport }}" - _oslomsg_configure_notify: "{{ (neutron_ceilometer_enabled | bool) or (neutron_designate_enabled | bool) }}" tags: - common-mq - neutron-config diff --git a/templates/neutron.conf.j2 b/templates/neutron.conf.j2 index 5ec92163..f02853df 100644 --- a/templates/neutron.conf.j2 +++ b/templates/neutron.conf.j2 @@ -249,19 +249,14 @@ ssl = {{ neutron_oslomsg_rpc_use_ssl }} rpc_conn_pool_size = {{ neutron_rpc_conn_pool_size }} # Notifications -{% if neutron_ceilometer_enabled or neutron_designate_enabled %} [oslo_messaging_notifications] -{% set notification_topics = [] %} -{% if neutron_ceilometer_enabled %} -{% set _ = notification_topics.append('notifications') %} -{% endif %} +{% set notification_topics = ['notifications'] %} {% if neutron_designate_enabled %} {% set _ = notification_topics.append(neutron_notifications_designate) %} {% endif %} -notification_topics = {{ notification_topics | join(',') }} +topics = {{ notification_topics | join(',') }} driver = messagingv2 transport_url = {{ neutron_oslomsg_notify_transport }}://{% for host in neutron_oslomsg_notify_servers.split(',') %}{{ neutron_oslomsg_notify_userid }}:{{ neutron_oslomsg_notify_password }}@{{ host }}:{{ neutron_oslomsg_notify_port }}{% if not loop.last %},{% else %}/{{ neutron_oslomsg_notify_vhost }}{% if neutron_oslomsg_notify_use_ssl | bool %}?ssl=1{% else %}?ssl=0{% endif %}{% endif %}{% endfor %} -{% endif %} # Concurrency (locking mechanisms) [oslo_concurrency]