Cannot use --os-auth-token with v2 client

Bug #1490462 reported by Stuart McLaren
6
This bug affects 1 person
Affects Status Importance Assigned to Milestone
Glance Client
Fix Released
High
Flavio Percoco

Bug Description

If you provide --os-auth-token to the glance v2 client it will fail.

$ glance --os-auth-token eed45af04f3d40baaae091f050a54cef --os-image-url http://localhost:9292 image-show 1ee7af78-4c66-4c48-bf70-eebfac578a8b
WARNING: The client is falling back to v1 because the accessing to v2 failed. This behavior will be removed in future versions
HTTPMultipleChoices (HTTP 300) Requested version of OpenStack Images API is not available.

Revision history for this message
Stuart McLaren (stuart-mclaren) wrote :

(If the v1 server is running the command may or may not fall back to v1 depending on whether the arguments are compatible or not.)

tags: added: 1.0.0-potential
summary: - Cannot use --x-auth-token with v2 client
+ Cannot use --os-auth-token with v2 client
Changed in python-glanceclient:
assignee: nobody → Flavio Percoco (flaper87)
importance: Undecided → High
Revision history for this message
OpenStack Infra (hudson-openstack) wrote : Fix proposed to python-glanceclient (master)

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

Changed in python-glanceclient:
status: New → In Progress
Revision history for this message
OpenStack Infra (hudson-openstack) wrote : Fix merged to python-glanceclient (master)

Reviewed: https://review.openstack.org/219686
Committed: https://git.openstack.org/cgit/openstack/python-glanceclient/commit/?id=1322fbc5d8323ff605c8b399fe0e1cb904b44f4e
Submitter: Jenkins
Branch: master

commit 1322fbc5d8323ff605c8b399fe0e1cb904b44f4e
Author: Flavio Percoco <email address hidden>
Date: Wed Sep 2 14:58:59 2015 +0200

    Consider `--os-token` when using v2

    The `_cache_schemas` call currently forces authentication even when the
    `auth_token` and `os_image_url` are passed. Instead of handling forced
    authentications, let the client use the passed arguments and
    authenticate only once if needed.

    This was not caught by the existing tests because the call to
    `_cache_schemas` was mocked.

    Change-Id: I93cec9a68cafc0992d14dab38114d03e25f1e5da
    Closes-bug: #1490462

Changed in python-glanceclient:
status: In Progress → Fix Committed
Changed in python-glanceclient:
milestone: none → 1.1.0
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.