Switch to get_notification_transport for Notifier

Incorrect transport would get used when dual backends configured
for oslo.messaging

Change-Id: Ifa5dfb07b32ad753a1bdad26d2517df29e27aedc
This commit is contained in:
Andrew Smith 2017-04-03 11:10:13 -04:00
parent 6ba005fa6b
commit 0cea730b10
2 changed files with 7 additions and 1 deletions

View File

@ -121,7 +121,8 @@ class Swift(object):
oslo_messaging.set_transport_defaults(conf.get('control_exchange',
'swift'))
self._notifier = oslo_messaging.Notifier(
oslo_messaging.get_transport(cfg.CONF, url=conf.get('url')),
oslo_messaging.get_notification_transport(cfg.CONF,
url=conf.get('url')),
publisher_id='ceilometermiddleware',
driver=conf.get('driver', 'messagingv2'),
topics=[conf.get('topic', 'notifications')])

View File

@ -0,0 +1,5 @@
---
fixes:
- Corrects retrieval of (notification) transport_url for oslo.messaging.
Issue would occur when oslo.messaging RPC and Notification backends were
separated.