If a project manually configures the oslo.messaging transport url for
notifications it should use 'get_notification_url', not
'get_transport_url'. get_transport_url should only be used to obtain
the RPC transport address.
Change-Id: I77772dfa9f30a3db2db6d0387260dfe3452a26ef
Closes-Bug: #1708754
... | ... |
@@ -536,7 +536,7 @@ function create_nova_conf { |
536 | 536 |
# Set the oslo messaging driver to the typical default. This does not |
537 | 537 |
# enable notifications, but it will allow them to function when enabled. |
538 | 538 |
iniset $NOVA_CONF oslo_messaging_notifications driver "messagingv2" |
539 |
- iniset $NOVA_CONF oslo_messaging_notifications transport_url $(get_transport_url) |
|
539 |
+ iniset $NOVA_CONF oslo_messaging_notifications transport_url $(get_notification_url) |
|
540 | 540 |
iniset_rpc_backend nova $NOVA_CONF |
541 | 541 |
iniset $NOVA_CONF glance api_servers "$GLANCE_URL" |
542 | 542 |
|
... | ... |
@@ -114,7 +114,7 @@ function rpc_backend_add_vhost { |
114 | 114 |
fi |
115 | 115 |
} |
116 | 116 |
|
117 |
-# builds transport url string |
|
117 |
+# Returns the address of the RPC backend in URL format. |
|
118 | 118 |
function get_transport_url { |
119 | 119 |
local virtual_host=$1 |
120 | 120 |
if is_service_enabled rabbit || { [ -n "$RABBIT_HOST" ] && [ -n "$RABBIT_PASSWORD" ]; }; then |
... | ... |
@@ -122,8 +122,9 @@ function get_transport_url { |
122 | 122 |
fi |
123 | 123 |
} |
124 | 124 |
|
125 |
-# Repeat the definition, in case get_transport_url is overriden for RPC purpose. |
|
126 |
-# get_notification_url can then be used to talk to rabbit for notifications. |
|
125 |
+# Returns the address of the Notification backend in URL format. This |
|
126 |
+# should be used to set the transport_url option in the |
|
127 |
+# oslo_messaging_notifications group. |
|
127 | 128 |
function get_notification_url { |
128 | 129 |
local virtual_host=$1 |
129 | 130 |
if is_service_enabled rabbit || { [ -n "$RABBIT_HOST" ] && [ -n "$RABBIT_PASSWORD" ]; }; then |