'RequestContext' object has no attribute 'is_image_visible'

Bug #827034 reported by Dan Prince
14
This bug affects 3 people
Affects Status Importance Assigned to Milestone
Glance
Invalid
Critical
Unassigned

Bug Description

Using Glance master 4fa3507.

I'm getting the following error when trying to list images (glance index):

  File "/usr/lib/pymodules/python2.6/webob/dec.py", line 208, in call_func
    return self.func(req, *args, **kwargs)
  File "/usr/lib/pymodules/python2.6/glance/common/wsgi.py", line 311, in __call__
    request, **action_args)
  File "/usr/lib/pymodules/python2.6/glance/common/wsgi.py", line 328, in dispatch
    return method(*args, **kwargs)
  File "/usr/lib/pymodules/python2.6/glance/registry/server.py", line 88, in index
    images = self._get_images(req.context, **params)
  File "/usr/lib/pymodules/python2.6/glance/registry/server.py", line 62, in _get_images
    return db_api.image_get_all(context, **params)
  File "/usr/lib/pymodules/python2.6/glance/registry/db/api.py", line 235, in image_get_all
    marker_image = image_get(context, marker)
  File "/usr/lib/pymodules/python2.6/glance/registry/db/api.py", line 145, in image_get
    if not context.is_image_visible(image):
AttributeError: 'RequestContext' object has no attribute 'is_image_visible'

Dan Prince (dan-prince)
Changed in glance:
importance: Undecided → Critical
Revision history for this message
Jay Pipes (jaypipes) wrote :

There is a corresponding change to the glance-registry.conf that I believe is the problem. You need to have the following in the glance-registry.conf, under the [filter:context]:

[filter:context]
context_class = glance.registry.context.RequestContext
paste.filter_factory = glance.common.context:filter_factory

Revision history for this message
Dan Prince (dan-prince) wrote :

Yep. Just found it myself.

We really need to get the paste configs out of the config files (#815208). Especially if we are changing them on a weekly basis.

Changed in glance:
status: New → Invalid
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.