Manila client 1.1.0 ignores region parameter
Affects | Status | Importance | Assigned to | Milestone | |
---|---|---|---|---|---|
python-manilaclient |
Fix Released
|
High
|
Julia Varlamova | ||
Liberty |
Fix Released
|
High
|
Julia Varlamova |
Bug Description
I asked about this on openstack-dev and was advised that the following is a bug:
I have multiple Manila endpoints, each is assigned to unique region. With an older (v1.0.2) Manila client I am able to choose the endpoint by specifying the region (e.g. manila --os-region-name regionABC list'.
This no longer works in the current (v.1.1.0) client, the region is ignored. Interestingly, I tried this on an other developer's setup and regions were also ignored even though his client says it is version 1.0.2.
The manila client that does work correctly with regions was one that I installed by following the instructions here: http://
I stepped through the client code and found that when v1/client.
I made a small change which makes the client behave how I think it should. If region is not specified it retains the original behavior of returning the first endpoint. If a region is specified then it will return the first endpoint with a matching region. The patch is below, my changes are between the #JAMJAM comments.
--- a/client.py 2015-04-22 16:05:10.000000000 -0700
+++ b/client.py 2015-04-22 16:00:56.000000000 -0700
@@ -142,10 +142,21 @@
if service_type in catalog:
- for e_type, endpoint in catalog.
- if str(e_type).lower() == str(endpoint_
- service_catalog_url = endpoint
- break
+ # JAMJAM START
+ srvCat=
+ for catalogEntry in srvCat:
+ if region_name != "":
+ region=
+ if region != region_name:
+ continue;
+ #for e_type, endpoint in catalog.
+ # JAMJAM END
+ for e_type, endpoint in catalogEntry.
+ if str(e_type).lower() == str(endpoint_
+ service_catalog_url = endpoint
+ break
+ if service_
+ break
if not service_
raise RuntimeError("Could not find Manila endpoint in catalog")
Best regards,
Joe Meadows
affects: | manila → python-manilaclient |
Changed in python-manilaclient: | |
importance: | Undecided → High |
status: | New → Triaged |
Changed in python-manilaclient: | |
assignee: | nobody → Julia Varlamova (jvarlamova) |
tags: | added: liberty-backport-potential |
Changed in python-manilaclient: | |
milestone: | none → 1.5.0 |
status: | Fix Committed → Fix Released |
Fix proposed to branch: master /review. openstack. org/225133
Review: https:/