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
This commit is contained in:
Andy Smith 2018-09-20 11:38:06 -04:00
parent 1c938d86e6
commit f1b2eed3eb
2 changed files with 1 additions and 4 deletions

View File

@ -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

View File

@ -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 }}