version-list command doesn't work

Bug #1444235 reported by Ken'ichi Ohmichi
10
This bug affects 2 people
Affects Status Importance Assigned to Milestone
python-novaclient
Fix Released
High
Ken'ichi Ohmichi

Bug Description

"nova list" or most command work fine, but "nova version-list" doesn't work now.

The following is debugging message:

$ nova --debug version-list
DEBUG (session:195) REQ: curl -g -i --cacert "/opt/stack/data/CA/int-ca/ca-chain.pem" -X GET http://192.168.11.62:5000/v2.0 -H "Accept: application/json" -H "User-Agent: python-keystoneclient"
DEBUG (retry:155) Converted retries value: 0 -> Retry(total=0, connect=None, read=None, redirect=0)
INFO (connectionpool:203) Starting new HTTP connection (1): 192.168.11.62
DEBUG (connectionpool:383) "GET /v2.0 HTTP/1.1" 200 339
DEBUG (session:224) RESP: [200] content-length: 339 vary: X-Auth-Token server: Apache/2.4.7 (Ubuntu) date: Wed, 15 Apr 2015 02:44:23 GMT content-type: application/json x-openstack-request-id: req-cb1f5dc8-9006-4415-b7c6-c35ecafcc542
RESP BODY: {"version": {"status": "stable", "updated": "2014-04-17T00:00:00Z", "media-types": [{"base": "application/json", "type": "application/vnd.openstack.identity-v2.0+json"}], "id": "v2.0", "links": [{"href": "http://192.168.11.62:5000/v2.0/", "rel": "self"}, {"href": "http://docs.openstack.org/", "type": "text/html", "rel": "describedby"}]}}

DEBUG (v2:76) Making authentication request to http://192.168.11.62:5000/v2.0/tokens
DEBUG (retry:155) Converted retries value: 0 -> Retry(total=0, connect=None, read=None, redirect=0)
DEBUG (connectionpool:383) "POST /v2.0/tokens HTTP/1.1" 200 3154
DEBUG (shell:914) 'NoneType' object has no attribute 'find'
Traceback (most recent call last):
  File "/usr/local/lib/python2.7/dist-packages/novaclient/shell.py", line 911, in main
    OpenStackComputeShell().main(argv)
  File "/usr/local/lib/python2.7/dist-packages/novaclient/shell.py", line 838, in main
    args.func(self.cs, args)
  File "/usr/local/lib/python2.7/dist-packages/novaclient/v2/shell.py", line 4456, in do_version_list
    result = cs.versions.list()
  File "/usr/local/lib/python2.7/dist-packages/novaclient/v2/versions.py", line 35, in list
    return self._list(None, "versions")
  File "/usr/local/lib/python2.7/dist-packages/novaclient/base.py", line 64, in _list
    _resp, body = self.api.client.get(url)
  File "/usr/local/lib/python2.7/dist-packages/keystoneclient/adapter.py", line 170, in get
    return self.request(url, 'GET', **kwargs)
  File "/usr/local/lib/python2.7/dist-packages/novaclient/client.py", line 89, in request
    **kwargs)
  File "/usr/local/lib/python2.7/dist-packages/keystoneclient/adapter.py", line 206, in request
    resp = super(LegacyJsonAdapter, self).request(*args, **kwargs)
  File "/usr/local/lib/python2.7/dist-packages/keystoneclient/adapter.py", line 95, in request
    return self.session.request(url, method, **kwargs)
  File "/usr/local/lib/python2.7/dist-packages/keystoneclient/utils.py", line 318, in inner
    return func(*args, **kwargs)
  File "/usr/local/lib/python2.7/dist-packages/keystoneclient/session.py", line 328, in request
    if not urllib.parse.urlparse(url).netloc:
  File "/usr/lib/python2.7/urlparse.py", line 143, in urlparse
    tuple = urlsplit(url, scheme, allow_fragments)
  File "/usr/lib/python2.7/urlparse.py", line 182, in urlsplit
    i = url.find(':')
AttributeError: 'NoneType' object has no attribute 'find'
ERROR (AttributeError): 'NoneType' object has no attribute 'find'
$

Revision history for this message
Ken'ichi Ohmichi (oomichi) wrote :

most commands send a request to the endpoint under "/v2/{tenant-id}/", but version-list command sends to "/".
So that would be a point of this problem I guess.

Revision history for this message
OpenStack Infra (hudson-openstack) wrote : Related fix proposed to python-novaclient (master)

Related fix proposed to branch: master
Review: https://review.openstack.org/173670

Changed in python-novaclient:
assignee: nobody → Ken'ichi Ohmichi (oomichi)
Changed in python-novaclient:
assignee: Ken'ichi Ohmichi (oomichi) → nobody
Changed in python-novaclient:
assignee: nobody → Ken'ichi Ohmichi (oomichi)
status: New → In Progress
melanie witt (melwitt)
Changed in python-novaclient:
importance: Undecided → High
Revision history for this message
OpenStack Infra (hudson-openstack) wrote : Fix merged to python-novaclient (master)

Reviewed: https://review.openstack.org/173670
Committed: https://git.openstack.org/cgit/openstack/python-novaclient/commit/?id=95421a37029e6555e5ef25fa1944e4ff229356ea
Submitter: Jenkins
Branch: master

commit 95421a37029e6555e5ef25fa1944e4ff229356ea
Author: Ken'ichi Ohmichi <email address hidden>
Date: Wed Apr 15 03:53:00 2015 +0000

    Don't use SessionClient for version-list API

    The endpoint of version API doesn't contain "/v2/{project-id}" and it is
    just "/". SessionClient is based on the endpoint "/v2/{project-id}/...",
    so this patch makes a client use a raw url for version-list API.

    Change-Id: I53f2afacce2dda14ac9761e824b48887f7c192f9
    Closes-Bug: #1444235

Changed in python-novaclient:
status: In Progress → Fix Committed
Matt Riedemann (mriedem)
Changed in python-novaclient:
milestone: none → 2.25.0
Matt Riedemann (mriedem)
Changed in python-novaclient:
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.