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
This commit is contained in:
Andy Smith 2018-09-20 11:03:54 -04:00
parent a77bcb617f
commit 83f815e072
2 changed files with 2 additions and 8 deletions

View File

@ -137,7 +137,6 @@
_oslomsg_notify_password: "{{ neutron_oslomsg_notify_password }}" _oslomsg_notify_password: "{{ neutron_oslomsg_notify_password }}"
_oslomsg_notify_vhost: "{{ neutron_oslomsg_notify_vhost }}" _oslomsg_notify_vhost: "{{ neutron_oslomsg_notify_vhost }}"
_oslomsg_notify_transport: "{{ neutron_oslomsg_notify_transport }}" _oslomsg_notify_transport: "{{ neutron_oslomsg_notify_transport }}"
_oslomsg_configure_notify: "{{ (neutron_ceilometer_enabled | bool) or (neutron_designate_enabled | bool) }}"
tags: tags:
- common-mq - common-mq
- neutron-config - neutron-config

View File

@ -249,19 +249,14 @@ ssl = {{ neutron_oslomsg_rpc_use_ssl }}
rpc_conn_pool_size = {{ neutron_rpc_conn_pool_size }} rpc_conn_pool_size = {{ neutron_rpc_conn_pool_size }}
# Notifications # Notifications
{% if neutron_ceilometer_enabled or neutron_designate_enabled %}
[oslo_messaging_notifications] [oslo_messaging_notifications]
{% set notification_topics = [] %} {% set notification_topics = ['notifications'] %}
{% if neutron_ceilometer_enabled %}
{% set _ = notification_topics.append('notifications') %}
{% endif %}
{% if neutron_designate_enabled %} {% if neutron_designate_enabled %}
{% set _ = notification_topics.append(neutron_notifications_designate) %} {% set _ = notification_topics.append(neutron_notifications_designate) %}
{% endif %} {% endif %}
notification_topics = {{ notification_topics | join(',') }} topics = {{ notification_topics | join(',') }}
driver = messagingv2 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 %} 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) # Concurrency (locking mechanisms)
[oslo_concurrency] [oslo_concurrency]