transport_url without trailing '/' considered virtual host 'None'
Affects | Status | Importance | Assigned to | Milestone | |
---|---|---|---|---|---|
oslo.messaging |
Fix Released
|
High
|
Ken Giusti |
Bug Description
It appears that in oslo-messaging 9.0.1, a transport_url without trailing '/' gets interpreted as virtual host 'None' and leads to connection refusal. I'm not sure whether this is a bug or intended behavior, but it does appear to be a new behavior beginning in 9.0.1.
The new behavior appears to be introduced by this change:
https:/
Specifically in the referenced line, where a ```url.virtual_host is None``` case previously took the default value of '/' from the rabbit_virtual_host option, now it gets cast into the string 'None'.
Here's an example failure from Congress gate:
Congress log:
ERROR oslo.messaging.
(http://
Rabbitmq log:
=ERROR REPORT==== 11-Oct-
Error on AMQP connection <0.2389.0> (149.202.
access to vhost 'None' refused for user 'stackrabbit'
(http://
-----
olso-messaging version: 9.0.1 according to upper constraints master branch
messaging server: rabbitmq
Platform: ubuntu 16.04
Config: transport_url = rabbit:
(http://
no longer affects: | congress |
Changed in oslo.messaging: | |
assignee: | nobody → Ken Giusti (kgiusti) |
Changed in oslo.messaging: | |
status: | New → Confirmed |
importance: | Undecided → High |
Yep, this is broken.
Previously all transport url values had a '/' appended automagically by oslo.messaging. This causes the connection to be scoped to the default rabbit vhost "/".
Now if a transport_url is configured without a trailing '/' (e.g. rabbit://host:5672) oslo.messaging won't append the trailing /. This is a behavioral change.
For now a workaround is to add a trailing '/' to the transport_url configuration value.