novaclient fails on version when using rackspace-auth-plugin

Bug #1493974 reported by Daniel Wallace
6
This bug affects 1 person
Affects Status Importance Assigned to Milestone
python-novaclient
Fix Committed
Undecided
Daniel Wallace

Bug Description

When there is no session, because novaclient is using an auth plugin instead of keystone, the fix in doesn't work.

https://review.openstack.org/#/c/220192/

REQ: curl -g -i 'https://iad.servers.api.rackspacecloud.com/' -X GET -H "Accept: application/json" -H "User-Agent: python-novaclient" -H "X-Auth-Token: <removed>" RESP: [401] {'content-length': '0', 'via': '1.1 Repose (Repose/7.1.3.0)', 'server': 'Jetty(9.2.z-SNAPSHOT)', 'x-trans-id': 'c9ade6f3-54a4-42e8-92c7-09fbf8d16bbd', 'date': 'Wed, 09 Sep 2015 18:45:03 GMT', 'www-authenticate': 'Keystone uri=https://identity.api.rackspacecloud.com/v2.0'} RESP BODY: null
DEBUG (shell:901) Unauthorized (HTTP 401)
Traceback (most recent call last):
  File "/Users/dani6186/.pyenv/versions/2.7.10/lib/python2.7/site-packages/novaclient/shell.py", line 898, in main
    OpenStackComputeShell().main(argv)
  File "/Users/dani6186/.pyenv/versions/2.7.10/lib/python2.7/site-packages/novaclient/shell.py", line 732, in main
    api_version = api_versions.discover_version(self.cs, api_version)
  File "/Users/dani6186/.pyenv/versions/2.7.10/lib/python2.7/site-packages/novaclient/api_versions.py", line 253, in discover_version
    client)
  File "/Users/dani6186/.pyenv/versions/2.7.10/lib/python2.7/site-packages/novaclient/api_versions.py", line 235, in _get_server_version_range
    version = client.versions.get_current()
  File "/Users/dani6186/.pyenv/versions/2.7.10/lib/python2.7/site-packages/novaclient/v2/versions.py", line 61, in get_current
    all_versions = self.list()
  File "/Users/dani6186/.pyenv/versions/2.7.10/lib/python2.7/site-packages/novaclient/v2/versions.py", line 80, in list
    return self._list(version_url, "versions")
  File "/Users/dani6186/.pyenv/versions/2.7.10/lib/python2.7/site-packages/novaclient/base.py", line 72, in _list
    _resp, body = self.api.client.get(url)
  File "/Users/dani6186/.pyenv/versions/2.7.10/lib/python2.7/site-packages/novaclient/client.py", line 445, in get
    return self._cs_request(url, 'GET', **kwargs)
  File "/Users/dani6186/.pyenv/versions/2.7.10/lib/python2.7/site-packages/novaclient/client.py", line 437, in _cs_request
    raise e
Unauthorized: Unauthorized (HTTP 401)
ERROR (Unauthorized): Unauthorized (HTTP 401)

Changed in python-novaclient:
assignee: nobody → Daniel Wallace (danielwallace)
status: New → In Progress
Revision history for this message
OpenStack Infra (hudson-openstack) wrote : Fix merged to python-novaclient (master)

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

commit b2221c8a7020ac66197360f594ba58b27434cf7d
Author: Daniel Wallace <email address hidden>
Date: Tue Sep 8 20:13:39 2015 -0500

    Fix bugs with rackspace

    not all apis have the versions available

    Rackspace api does not open up for querying versions. This causes it to
    still break when using the rackspace-auth-plugin

    add tests for api_version Unauthorized

    make sure that the list can still run even if the api_version check is
    unauthorized.

    Closes-Bug: #1493974
    Closes-Bug: #1491579
    Change-Id: I038b84bad5b747a0688aef989f1337aee835b945

Changed in python-novaclient:
status: In Progress → Fix Committed
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.