glance cache manage middleware not enabled

Asked by Gustavo Randich on 2013-02-27

I'm trying to configure glance image cache with folsom, but glance-cache-manage list-cached keeps saying:

       Cache management middleware not enabled on host

I've configured this in glance-api.conf

    flavor = keystone+cachemanagement

With Essex I had no problems with the image cache.

Requesting the cached images list to v1 of the api via curl works ok, but not with v2:

    $ curl --header "x-auth-token: $TOKEN" http://localhost:9292/v1/cached_images
    {"cached_images": []}

    $ curl --header "x-auth-token: $TOKEN" http://localhost:9292/v2/cached_images
     <title>404 Not Found</title>
     <h1>404 Not Found</h1>
     The resource could not be found.<br /><br />

Note: there's a warning about "The 'glance.client' module is deprecated in favor of the 'glanceclient' module provided by python-glanceclient" Does this affects the issue?

Question information

English Edit question
Glance Edit question
No assignee Edit question
Solved by:
Gustavo Randich
Last query:
Last reply:
Eoghan Glynn (eglynn) said : #1

The cachemanagement middleware is hardcoded to expose its API as v1 only.

I've raised a bug for this:

The deprecation warning is a known issue

and is fixed here:

We've been using mseknibilel's Folsom Install Guide guide to install, in which a script inserts a Keystone Image endpoint with v2 instead of v1, and that was the origin of the problem (

We corrected the db record, restarted keystone, and the problem was solved.

Thank you.

To enable v1 endpoint for Glance, simply replace "v2" with "v1" in the 'extra' column of the 'endpoint' table in 'keystone' database -- the row to modify is the one with "id" equal to the "service_id" with 'image' type in the 'service' table.