Note: This bug is displayed in read-only format because the product is no longer active in Red Hat Bugzilla.

Bug 929108

Summary: [RFE] Put glance cache under a different prefix and port
Product: Red Hat OpenStack Reporter: Flavio Percoco <fpercoco>
Component: openstack-glanceAssignee: RHOS Maint <rhos-maint>
Status: CLOSED UPSTREAM QA Contact: Attila Fazekas <afazekas>
Severity: unspecified Docs Contact:
Priority: unspecified    
Version: 3.0CC: eglynn, fpercoco, scohen, yeylon
Target Milestone: ---Keywords: FutureFeature, Triaged
Target Release: ---   
Hardware: Unspecified   
OS: Unspecified   
URL: https://blueprints.launchpad.net/glance/+spec/glance-cache-path
Whiteboard: upstream_milestone_none upstream_status_unknown upstream_definition_discussion
Fixed In Version: Doc Type: Enhancement
Doc Text:
Story Points: ---
Clone Of:
: 1062017 (view as bug list) Environment:
Last Closed: 2015-06-30 19:47:49 UTC Type: Bug
Regression: --- Mount Type: ---
Documentation: --- CRM:
Verified Versions: Category: ---
oVirt Team: --- RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: --- Target Upstream Version:
Embargoed:
Bug Depends On:    
Bug Blocks: 1062017    

Description Flavio Percoco 2013-03-29 09:26:36 UTC
Description of problem:

The cachemanagement API is hardcoded to use v1:

  https://github.com/openstack/glance/blob/master/glance/api/middleware/cache_manage.py#L36

whereas if the v2 API is enabled, but not v1, this is problematic as clients would want to use v2 across the board.

Steps to Reproduce:
1. Install Glance
2. Disable v1 in *-paste.ini files
3. Call any url related to the cache middleware.
  
Actual results:

$ curl -H "X-Auth-Token: $tok" http://10.130.50.34:9292/v1/cached_images | python -m json.tool
  % Total % Received % Xferd Average Speed Time Time Time Current
                                 Dload Upload Total Spent Left Speed
100 119 100 119 0 0 25142 0 --:--:-- --:--:-- --:--:-- 29750
{
    "versions": [
        {
            "id": "v2.0",
            "links": [
                {
                    "href": "http://10.130.50.34:9292/v2/",
                    "rel": "self"
                }
            ],
            "status": "CURRENT"
        }
    ]
}


Expected results:

It should return the list of cached_images (if cache is enabled)

Comment 3 Ayal Baron 2013-07-14 07:06:17 UTC
John, why isn't this a duplicate of multi-locations?

Comment 4 John Bresnahan 2013-07-15 19:50:54 UTC
(In reply to Ayal Baron from comment #3)
> John, why isn't this a duplicate of multi-locations?

Ayal,

That is an interesting question and one that I have pushed on upstream.  Idealling a cached location would be 'just another location' in the list of locations.  However the way that glance was architected leaves this quite futuristic.  In the short term the cache will have to continue sit on top.

Comment 11 Flavio Percoco 2015-06-30 19:47:49 UTC
There are many changes happening in Glance's API versioning and that includes glance-cache. I'm going to close this as UPSTREAM and recommend tracking it there.