url_for does not exists for service catalog

Bug #1538482 reported by Kairat Kushaev
6
This bug affects 1 person
Affects Status Importance Assigned to Milestone
glance_store
Fix Released
High
Kairat Kushaev

Bug Description

Here we introduced url_for method for service_catalog:
https://review.openstack.org/#/c/250857/

Unfortunately, we are parsing service_catalog and passing it to glance_store as a list in context:
https://github.com/openstack/glance/blob/master/glance/api/middleware/context.py#L117

Because of this current glance_store master is broken when swift multi-tenant store is enabled with an error like this:
list doesn't have an attribute url_for.
That happens every time somebody would like to download/upload images.

We also need to pass ServiceCatalog from glance to glance_store. It is better than initializing ServiceCatalog in glance_store. It alos saves a lot time when upgrading from Keystone v2 to v3.

Changed in glance-store:
assignee: nobody → Kairat Kushaev (kkushaev)
Revision history for this message
OpenStack Infra (hudson-openstack) wrote : Fix proposed to glance_store (master)

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

Changed in glance-store:
status: New → In Progress
Changed in glance-store:
importance: Undecided → High
description: updated
Changed in glance:
assignee: nobody → Kairat Kushaev (kkushaev)
Revision history for this message
OpenStack Infra (hudson-openstack) wrote : Fix merged to glance_store (master)

Reviewed: https://review.openstack.org/272990
Committed: https://git.openstack.org/cgit/openstack/glance_store/commit/?id=8677f9287761d848d529aed9ecf2cb2800b5418c
Submitter: Jenkins
Branch: master

commit 8677f9287761d848d529aed9ecf2cb2800b5418c
Author: kairat_kushaev <email address hidden>
Date: Wed Jan 27 13:18:27 2016 +0300

    Use url_for from keystoneclient in swift store

    glance doesn't pass ServiceCatalog to glance_store
    in user context(glance just passes a list of service endpoints).
    So when swift multi-tenant store is enabled then there is no
    method url_for for context.service_catalog.
    We can use ServiceCatalog from keystoneclient for these
    purposes and convert this list to ServiceCatalog if url_for
    method is not present.
    Please also note that keystone.middleware converts
    X-Service-Catalog to v2 so we can safely initialize and use
    ServiceCatalogV2 in glance_store.

    Closes-Bug: #1538482

    Change-Id: I3c4c56e91656f09067d28923ed45595395e9880e

Changed in glance-store:
status: In Progress → Fix Released
Revision history for this message
Doug Hellmann (doug-hellmann) wrote : Fix included in openstack/glance_store 0.11.0

This issue was fixed in the openstack/glance_store 0.11.0 release.

Revision history for this message
Kairat Kushaev (kkushaev) wrote :

Looks like passing Service Catalog requires some kind of spec.
So I am deleting Glance as affected project.

no longer affects: glance
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.