Unclear / Ambiguous error message calling volume list

Bug #1241177 reported by jnoller
8
This bug affects 1 person
Affects Status Importance Assigned to Milestone
python-cinderclient
Fix Released
Undecided
Terry Howe
python-openstackclient
Fix Released
Medium
Terry Howe

Bug Description

Using openstack client (latest: trunk) against rackspace cloud; with the following environment exports:

export OS_REGION_NAME=DFW
export OS_USERNAME=...
export OS_TENANT_NAME=" "
export OS_PASSWORD=...
export OS_AUTH_URL=https://identity.api.rackspacecloud.com/v2.0

Result:

[osclient] pug:python-openstackclient jesse$ openstack volume list
Found more than one valid endpoint. Use a more restrictive filter
ERROR: cliff.app AmbiguousEndpoints: [{'serviceName': u'cloudBlockStorage', u'region': u'SYD', u'publicURL': u'https://syd.blockstorage.api.rackspacecloud.com/v1/821928', u'tenantId': u'821928'}, {'serviceName': u'cloudBlockStorage', u'region': u'ORD', u'publicURL': u'https://ord.blockstorage.api.rackspacecloud.com/v1/821928', u'tenantId': u'821928'}, {'serviceName': u'cloudBlockStorage', u'region': u'DFW', u'publicURL': u'https://dfw.blockstorage.api.rackspacecloud.com/v1/821928', u'tenantId': u'821928'}, {'serviceName': u'cloudBlockStorage', u'region': u'IAD', u'publicURL': u'https://iad.blockstorage.api.rackspacecloud.com/v1/821928', u'tenantId': u'821928'}]
[osclient] pug:python-openstackclient jesse$

It's unclear from the ERROR line what filter (the help options aren't clear as well) should be applied. Here's the verbose options:

DEBUG: openstackclient.shell prepare_to_run_command ListVolume
DEBUG: openstackclient.shell validating authentication options
DEBUG: openstackclient.identity.client instantiating identity client: password flow
DEBUG: openstackclient.volume.v1.volume.ListVolume take_action(Namespace(all_projects=False, columns=[], formatter='table', long=False, name=None, quote_mode='nonnumeric', status=None))
DEBUG: openstackclient.volume.client instantiating volume client
Found more than one valid endpoint. Use a more restrictive filter
ERROR: cliff.app AmbiguousEndpoints: [{'serviceName': u'cloudBlockStorage', u'region': u'SYD', u'publicURL': u'https://syd.blockstorage.api.rackspacecloud.com/v1/821928', u'tenantId': u'821928'}, {'serviceName': u'cloudBlockStorage', u'region': u'ORD', u'publicURL': u'https://ord.blockstorage.api.rackspacecloud.com/v1/821928', u'tenantId': u'821928'}, {'serviceName': u'cloudBlockStorage', u'region': u'DFW', u'publicURL': u'https://dfw.blockstorage.api.rackspacecloud.com/v1/821928', u'tenantId': u'821928'}, {'serviceName': u'cloudBlockStorage', u'region': u'IAD', u'publicURL': u'https://iad.blockstorage.api.rackspacecloud.com/v1/821928', u'tenantId': u'821928'}]
DEBUG: openstackclient.shell clean_up ListVolume
DEBUG: openstackclient.shell got an error: AmbiguousEndpoints: [{'serviceName': u'cloudBlockStorage', u'region': u'SYD', u'publicURL': u'https://syd.blockstorage.api.rackspacecloud.com/v1/821928', u'tenantId': u'821928'}, {'serviceName': u'cloudBlockStorage', u'region': u'ORD', u'publicURL': u'https://ord.blockstorage.api.rackspacecloud.com/v1/821928', u'tenantId': u'821928'}, {'serviceName': u'cloudBlockStorage', u'region': u'DFW', u'publicURL': u'https://dfw.blockstorage.api.rackspacecloud.com/v1/821928', u'tenantId': u'821928'}, {'serviceName': u'cloudBlockStorage', u'region': u'IAD', u'publicURL': u'https://iad.blockstorage.api.rackspacecloud.com/v1/821928', u'tenantId': u'821928'}]
[osclient] pug:python-openstackclient jesse$

Revision history for this message
Steve Martinelli (stevemar) wrote :

You can filter volumes by name, status or project. Were you able to get it working at all?

Revision history for this message
Steve Martinelli (stevemar) wrote :

Can you try filtering by name?

for example:
(.venv)openstack@plwdevstack:/opt/stack/python-openstackclient$ openstack volume list --name myVol
+--------------------------------------+--------------+-----------+------+----------+
| ID | Display Name | Status | Size | Attached |
+--------------------------------------+--------------+-----------+------+----------+
| 86080e03-7ee6-4bbb-a40b-64e5aa21b61c | myVol | available | 1 | |
+--------------------------------------+--------------+-----------+------+----------+

Revision history for this message
Dean Troyer (dtroyer) wrote :

I think this is due to having multiple endpoints in the service catalog. Actually, multiple regions. There is another bug about regions not working (https://bugs.launchpad.net/python-openstackclient/+bug/1254168), these may be related.

Changed in python-openstackclient:
importance: Undecided → Medium
milestone: none → m2
Terry Howe (thowe-g)
Changed in python-openstackclient:
assignee: nobody → Terry Howe (thowe-g)
status: New → In Progress
Revision history for this message
Terry Howe (thowe-g) wrote :
Download full text (4.9 KiB)

For volumes, I was able to fix the problem by adding region_name in the client. It still generates the ambiguous error if nothing is set or past though, but that error kind of makes sense to me.

(.venv)terry@brat:~/hp/python-openstackclient$ export OS_REGION_NAME=region-a.geo-1
(.venv)terry@brat:~/hp/python-openstackclient$ os volume list
WARNING: keystoneclient.httpclient Failed to retrieve management_url from token
+--------------------------------------+--------------+-----------+------+----------+
| ID | Display Name | Status | Size | Attached |
+--------------------------------------+--------------+-----------+------+----------+
| 480534be-cce8-4ef1-b453-117888842c68 | volly | available | 1 | |
+--------------------------------------+--------------+-----------+------+----------+
(.venv)terry@brat:~/hp/python-openstackclient$ os volume list --os-region-name region-b.geo-1
WARNING: keystoneclient.httpclient Failed to retrieve management_url from token
+--------------------------------------+--------------------------------+-----------+------+----------+
| ID | Display Name | Status | Size | Attached |
+--------------------------------------+--------------------------------+-----------+------+----------+
| 2f2e6136-3f3c-4733-a5dd-245ed00cca4a | TestBootableVolume | available | 10 | |
| a009faa8-c7af-4be6-9e39-8ed5de516646 | TestBootableVolume | available | 20 | |
| 2aa260d2-e3e4-4c85-8686-68a8691a23d2 | cli_devexbuild_1379090817_add4 | available | 10 | |
| 0bb16b0a-e107-4fb5-8616-f2f586373ee2 | cli_devexbuild_1379024875_add4 | available | 10 | |
| 27823d0c-3c11-43b6-8731-551f4f23e656 | cli_devexbuild_1378827793_del2 | available | 1 | |
| 9d5176ee-c1a4-41d1-ae92-5ca7f682d688 | cli_test_vol3 | available | 1 | |
| 6fee57bb-fe45-4e87-b5bf-8e7eced5366f | cli_test_vol2 | available | 1 | |
| 4bf252c3-e3e5-4994-a966-ade19beacf3b | cli_test_vol1 | available | 1 | |
| 320c813d-b35a-474b-8c7f-396e63d108dd | cli_test_snap2 | available | 1 | |
| 046ac0e8-3983-49e0-92d0-16e9c29fcd8d | cli_test_snap1 | available | 1 | |
| 201140ba-0e07-430f-96c5-10e4c17d3457 | bootabill2 | available | 20 | |
| 7aaff91d-25cc-416f-9d61-f3cd05c7c7ea | restoreo | available | 10 | |
| 3486411a-e83a-45aa-bd9d-0f7f8640bfcd | database | available | 10 | |
+--------------------------------------+--------------------------------+-----------+------+----------+
(.venv)terry@brat:~/hp/python-openstackclient$ unset OS_REGION_NAME
(.venv)terry@brat:~/hp/python-openstackclient$ os volume list
WARNING: keystoneclient.httpclient Failed to retrieve management_url from token
Found more than one valid endpoint. Use a more restrictive filter
ERROR: cliff.app AmbiguousEndpoints: [{u'region': u'az-1.region-a.geo-1', u'tenantId': u'96554402455058', u'versionId': u'1.1', '...

Read more...

Revision history for this message
OpenStack Infra (hudson-openstack) wrote : Fix proposed to python-openstackclient (master)

Fix proposed to branch: master
Review: https://review.openstack.org/75546

Revision history for this message
Steve Martinelli (stevemar) wrote :

I don't mind the warning, but error is unsettling.

Terry Howe (thowe-g)
Changed in python-cinderclient:
assignee: nobody → Terry Howe (thowe-g)
status: New → In Progress
Revision history for this message
OpenStack Infra (hudson-openstack) wrote : Fix proposed to python-cinderclient (master)

Fix proposed to branch: master
Review: https://review.openstack.org/75962

Revision history for this message
OpenStack Infra (hudson-openstack) wrote : Fix merged to python-openstackclient (master)

Reviewed: https://review.openstack.org/75546
Committed: https://git.openstack.org/cgit/openstack/python-openstackclient/commit/?id=eddab621094e5da9f9c6bf2ae27a872625c8e135
Submitter: Jenkins
Branch: master

commit eddab621094e5da9f9c6bf2ae27a872625c8e135
Author: Terry Howe <email address hidden>
Date: Fri Feb 21 17:22:26 2014 -0700

    Fix volume commands with multiple regions

    The region_name was not passed into the the client causing volume
    commands to fail if there were multiple regions.

    Change-Id: I066dbbc4852f412e017daeeb16a3f186d3f91d2f
    Closes-Bug: #1241177

Changed in python-openstackclient:
status: In Progress → Fix Committed
Dean Troyer (dtroyer)
Changed in python-openstackclient:
status: Fix Committed → Fix Released
Revision history for this message
OpenStack Infra (hudson-openstack) wrote : Fix merged to python-cinderclient (master)

Reviewed: https://review.openstack.org/75962
Committed: https://git.openstack.org/cgit/openstack/python-cinderclient/commit/?id=7f56f0a8c315d514fcbb6ae353a5cc83ce1a5c84
Submitter: Jenkins
Branch: master

commit 7f56f0a8c315d514fcbb6ae353a5cc83ce1a5c84
Author: Terry Howe <email address hidden>
Date: Mon Feb 24 12:17:49 2014 -0700

    Pretty print of endpoints for ambiguous error

    Pretty print the list of endpoints by region for ambigous endpoint error

    Change-Id: Ia99b6d46b1944db631fc4bd446aeae77abb08262
    Closes-Bug: #1241177

Changed in python-cinderclient:
status: In Progress → Fix Committed
Changed in python-cinderclient:
milestone: none → 1.3.1
status: Fix Committed → Fix Released
To post a comment you must log in.
This report contains Public information  
Everyone can see this information.

Other bug subscribers

Remote bug watches

Bug watches keep track of this bug in other bug trackers.