I have find the reason of this bug, In the source file "master/keystone/token/providers/common.py", the function of "format_catalog", as below:
==============================
for region, region_ref in catalog_ref.items():
for service, service_ref in region_ref.items(): new_service_ref = services.get(service, {}) new_service_ref['name'] = service_ref.pop('name') new_service_ref['type'] = service new_service_ref['endpoints_links'] = [] service_ref['region'] = region
return list(services.values())
===========================================
In the loop, the services dict use service type as key, when the type name are the same, but the service name are not the same, ex: region1: type=volume, name=cinder; region2: type=volume, name=cinder1. then the dict of services use "volume" as key, the last item will overwrite the previous value.
I have find the reason of this bug, In the source file "master/ keystone/ token/providers /common. py", the function of "format_catalog", as below: ======= ======= ======= == ref.items( ):
new_service_ ref = services. get(service, {})
new_service_ ref['name' ] = service_ ref.pop( 'name')
new_service_ ref['type' ] = service
new_service_ ref['endpoints_ links'] = []
service_ ref['region' ] = region
=======
for region, region_ref in catalog_
for service, service_ref in region_ref.items():
return list(services. values( )) ======= ======= ======= ======= ======= =
=======
In the loop, the services dict use service type as key, when the type name are the same, but the service name are not the same, ex: region1: type=volume, name=cinder; region2: type=volume, name=cinder1. then the dict of services use "volume" as key, the last item will overwrite the previous value.