glance client doc root initialized to /v1/v1

Bug #992600 reported by Dan Prince
6
This bug affects 1 person
Affects Status Importance Assigned to Milestone
Glance
Fix Released
High
Dan Prince
Essex
Invalid
Medium
Unassigned

Bug Description

Using Glance Folsom after commit 60ab521b01b4f653655eecd8ba2e561a7bbdf0c9.

I'm getting the following error when trying to use glance CLI commands:

[root@nova1 glance]# glance index

Failed to show index. Got error:
An object with the specified identifier was not found.
Details: 404 Not Found

The resource could not be found.

-----

After some debugging it looks like glance client's new URL version checks don't handle the case where doc_root starts with a slash.

This seems to fix it...

--- a/glance/common/client.py
+++ b/glance/common/client.py
@@ -50,7 +50,7 @@ LOG = logging.getLogger(__name__)
 # common chunk size for get and put
 CHUNKSIZE = 65536

-VERSION_REGEX = re.compile(r"v[0-9\.]+")
+VERSION_REGEX = re.compile(r"\/?v[0-9\.]+")

Dan Prince (dan-prince)
Changed in glance:
assignee: nobody → Dan Prince (dan-prince)
status: New → In Progress
importance: Undecided → High
Revision history for this message
OpenStack Infra (hudson-openstack) wrote : Fix proposed to glance (master)

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

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

Reviewed: https://review.openstack.org/6960
Committed: http://github.com/openstack/glance/commit/fb710288707a8d46cbe898d1b40810d2907e448f
Submitter: Jenkins
Branch: master

commit fb710288707a8d46cbe898d1b40810d2907e448f
Author: Dan Prince <email address hidden>
Date: Tue May 1 09:42:16 2012 -0400

    Support conf from URL's with versions.

    Adjusts our version match regex so that it detects URL's
    which already have version's in them that start with
    a '/'.

    For example: '/v1'

    Fixes LP Bug #992600.

    Change-Id: I331e945c46757a01a4dd939b2098e68334b27530

Changed in glance:
status: In Progress → Fix Committed
Thierry Carrez (ttx)
Changed in glance:
milestone: none → folsom-1
status: Fix Committed → Fix Released
Revision history for this message
Mark McLoughlin (markmc) wrote :

Eoghan's take on this for essex:

  Not suitable for backporting as version regex matching only came in post-essex

Thierry Carrez (ttx)
Changed in glance:
milestone: folsom-1 → 2012.2
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.