Templated catalog does not handle multi-regions properly
Affects | Status | Importance | Assigned to | Milestone | |
---|---|---|---|---|---|
OpenStack Identity (keystone) |
Fix Released
|
Medium
|
Erik Olof Gunnar Andersson |
Bug Description
The current implementation of the keystone templated catalog does not group endpoints properly when there are multiple regions available.
This is an working example when using the sql backend and the openstack catalog list command.
| nova | compute | RegionTwo
| | | admin: http://
| | | RegionOne
| | | admin: http://
This is the same example using the templated backend and the openstack catalog list command.
| nova | compute | RegionTwo
| | | admin: http://
| nova | compute | RegionOne
| | | admin: http://
This causes issues in services that expects each service_type to include the endpoint for all regions.
This is because the code in for example Horizon is initially only looking for the service_type, which will return the first one, in this case is RegionTwo. If Horizon was requesting RegionOne, this would fail, as the list of endpoints would only contain RegionTwo.
As a work-around for Horizon a change like this is required
http://
-def get_service_
+def get_service_
if catalog:
for service in catalog:
if 'type' not in service:
if service['type'] == service_type:
- return service
+ for endpoint in service[
+ if endpoint['region'] == region:
+ return service
return None
description: | updated |
Changed in keystone: | |
status: | Triaged → In Progress |
Changed in keystone: | |
status: | Invalid → In Progress |
This is likely a small amount of work require to get the templated catalog at feature parity with the SQL catalog backend.
There is a patch proposed to fix this specific issue though [0].
[0] https:/ /review. openstack. org/#/c/ 482364/