Failed to list extensions with "keystone discover"

Bug #1266710 reported by Qiu Yu
12
This bug affects 1 person
Affects Status Importance Assigned to Milestone
python-keystoneclient
Fix Released
Medium
Qiu Yu

Bug Description

"keystone discover" failed to list supported extensions. Simply run "keystone discover" returns nothing about extension list. With --debug, it shows extension list has already been returned. But client side failed to read it out.

$ keystone discover
Keystone found at http://192.168.56.102:5000/v2.0
    - supports version v2.0 (stable) here http://192.168.56.102:5000/v2.0/
No handlers could be found for logger "keystoneclient.generic.client"

$ keystone --debug discover
DEBUG:keystoneclient.session:REQ: curl -i -X GET http://192.168.56.102:5000/v2.0 -H "Accept: application/json" -H "User-Agent: python-keystoneclient"
INFO:requests.packages.urllib3.connectionpool:Starting new HTTP connection (1): 192.168.56.102
DEBUG:requests.packages.urllib3.connectionpool:"GET /v2.0 HTTP/1.1" 200 617
DEBUG:keystoneclient.session:RESP: [200] CaseInsensitiveDict({'date': 'Tue, 07 Jan 2014 10:29:56 GMT', 'vary': 'X-Auth-Token', 'content-length': '617', 'content-type': 'application/json'})
RESP BODY: {"version": {"status": "stable", "updated": "2013-03-06T00:00:00Z", "media-types": [{"base": "application/json", "type": "application/vnd.openstack.identity-v2.0+json"}, {"base": "application/xml", "type": "application/vnd.openstack.identity-v2.0+xml"}], "id": "v2.0", "links": [{"href": "http://192.168.56.102:5000/v2.0/", "rel": "self"}, {"href": "http://docs.openstack.org/api/openstack-identity-service/2.0/content/", "type": "text/html", "rel": "describedby"}, {"href": "http://docs.openstack.org/api/openstack-identity-service/2.0/identity-dev-guide-2.0.pdf", "type": "application/pdf", "rel": "describedby"}]}}

Keystone found at http://192.168.56.102:5000/v2.0
    - supports version v2.0 (stable) here http://192.168.56.102:5000/v2.0/
DEBUG:keystoneclient.session:REQ: curl -i -X GET http://192.168.56.102:5000/v2.0/extensions -H "Accept: application/json" -H "User-Agent: python-keystoneclient"
INFO:requests.packages.urllib3.connectionpool:Starting new HTTP connection (1): 192.168.56.102
DEBUG:requests.packages.urllib3.connectionpool:"GET /v2.0/extensions HTTP/1.1" 200 722
DEBUG:keystoneclient.session:RESP: [200] CaseInsensitiveDict({'date': 'Tue, 07 Jan 2014 10:29:56 GMT', 'vary': 'X-Auth-Token', 'content-length': '722', 'content-type': 'application/json'})
RESP BODY: {"extensions": {"values": [{"updated": "2013-07-07T12:00:0-00:00", "name": "OpenStack Keystone User CRUD", "links": [{"href": "https://github.com/openstack/identity-api", "type": "text/html", "rel": "describedby"}], "namespace": "http://docs.openstack.org/identity/api/ext/OS-KSCRUD/v1.0", "alias": "OS-KSCRUD", "description": "OpenStack extensions to Keystone v2.0 API enabling User Operations."}, {"updated": "2013-07-07T12:00:0-00:00", "name": "OpenStack EC2 API", "links": [{"href": "https://github.com/openstack/identity-api", "type": "text/html", "rel": "describedby"}], "namespace": "http://docs.openstack.org/identity/api/ext/OS-EC2/v1.0", "alias": "OS-EC2", "description": "OpenStack EC2 Credentials backend."}]}}

ERROR:keystoneclient.generic.client:
Traceback (most recent call last):
  File "/home/stack/python-keystoneclient/keystoneclient/generic/client.py", line 177, in _check_keystone_extensions
    raise exceptions.AuthorizationFailure()
AuthorizationFailure

Qiu Yu (unicell)
Changed in python-keystoneclient:
assignee: nobody → Qiu Yu (unicell)
Revision history for this message
OpenStack Infra (hudson-openstack) wrote : Fix proposed to python-keystoneclient (master)

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

Changed in python-keystoneclient:
status: New → In Progress
Changed in python-keystoneclient:
assignee: Qiu Yu (unicell) → Dolph Mathews (dolph)
Dolph Mathews (dolph)
Changed in python-keystoneclient:
importance: Undecided → Medium
assignee: Dolph Mathews (dolph) → Qiu Yu (unicell)
Revision history for this message
OpenStack Infra (hudson-openstack) wrote : Fix merged to python-keystoneclient (master)

Reviewed: https://review.openstack.org/65252
Committed: https://git.openstack.org/cgit/openstack/python-keystoneclient/commit/?id=2f96899534776866d362f51e3e8cb9c439906f10
Submitter: Jenkins
Branch: master

commit 2f96899534776866d362f51e3e8cb9c439906f10
Author: Qiu Yu <email address hidden>
Date: Tue Jan 7 18:37:08 2014 +0800

    Fix discover command failed to read extension list issue

    Fix the key error which caused discover command failed to read the
    response body of extension list result. This change also added test
    cases to cover the use case of generic client extension discovery.

    Change-Id: Id687f8d73cead28f594de00d3b5ff9086558947b
    Closes-Bug: #1266710

Changed in python-keystoneclient:
status: In Progress → Fix Committed
Dolph Mathews (dolph)
Changed in python-keystoneclient:
milestone: none → 0.5.0
Dolph Mathews (dolph)
Changed in python-keystoneclient:
status: Fix Committed → Fix Released
To post a comment you must log in.
This report contains Public information  
Everyone can see this information.

Duplicates of this bug

Other bug subscribers

Remote bug watches

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