Glance always picks the first endpoint from the service catalog
Affects | Status | Importance | Assigned to | Milestone | |
---|---|---|---|---|---|
Glance |
Fix Released
|
High
|
Stuart McLaren |
Bug Description
Glance is hardcoded to pick the first endpoint from the service catalog with keystone. From common/auth.py:
# FIXME(sirp): for now just using the first endpoint we get back
# from the service catalog for glance, and using the public url.
for service in resp_auth[
if service['type'] == 'image':
else:
Obviously this fails when there are multiple endpoints per service:
{
"name": "Image Management",
"type": "image",
"endpoints": [
{
"region": "az-1.region-
},
{
"region": "az-2.region-
}
]
},
I believe at the minimum it should also honor the region identifier.
Changed in glance: | |
assignee: | nobody → Eoghan Glynn (eglynn) |
Changed in glance: | |
assignee: | Juerg Haefliger (juergh) → Stuart McLaren (stuart-mclaren) |
status: | Triaged → In Progress |
Changed in glance: | |
milestone: | essex-4 → essex-rc1 |
Changed in glance: | |
milestone: | essex-4 → 2012.1 |
Hi Juerg!
Yes, this is a clear need. Steps needed:
1) Create a region configuration option that will be used by the Glance API -> Glance Registry client communication
2) Allow a region parameter (and corresponding environ variable) to the Glance CLI tool that allows to pick a specific region from a list of region identifiers
3) Change the code mentioned above in the common/auth.py code to pick an appropriate region
Best,
-jay