[openstack-dev] Glance GET /images/detail DetachedIntanceError on 'tags' attribute

Ray Pekowski pekowski at gmail.com
Wed May 15 20:51:25 UTC 2013


In my testing of Folsom in an HA environment including the use of haproxy
fronting three "contoller" nodes and mysql using wsrep on each of those
nodes I have been seeing an occasional HTTP 500 error on Glance image list
operations.  I don't know if this is due to my HA environment.  I have only
done a little troubleshooting and web searching on the problem.  I'll be a
little lazy and post what I am seeing here in case it is a well known
problem.  Here is a wireshark dump of the failing API flying across the
wire:

GET /images/detail?limit=20 HTTP/1.1
Host: 10.49.56.250:9191
Accept-Encoding: identity
x-openstack-request-id: req-b1d626b9-fb91-45d6-8e7b-029caf143fd6
x-auth-token: 3600d26b1a6348859141ac5cf4e80b9f

HTTP/1.1 500 Internal Server Error
Content-Type: text/plain
Content-Length: 2839
Date: Wed, 15 May 2013 17:39:57 GMT
Connection: close

Traceback (most recent call last):
  File "/usr/lib/python2.7/dist-packages/eventlet/wsgi.py", line 336, in
handle_one_response
    result = self.application(self.environ, start_response)
  File
"/usr/lib/python2.7/dist-packages/keystone/middleware/auth_token.py", line
279, in __call__
    return self.app(env, start_response)
  File "/usr/lib/python2.7/dist-packages/webob/dec.py", line 147, in
__call__
    resp = self.call_func(req, *args, **self.kwargs)
  File "/usr/lib/python2.7/dist-packages/webob/dec.py", line 210, in
call_func
    return self.func(req, *args, **kwargs)
  File "/usr/lib/python2.7/dist-packages/glance/common/wsgi.py", line 326,
in __call__
    response = req.get_response(self.application)
  File "/usr/lib/python2.7/dist-packages/webob/request.py", line 1086, in
get_response
    application, catch_exc_info=False)
  File "/usr/lib/python2.7/dist-packages/webob/request.py", line 1055, in
call_application
    app_iter = application(self.environ, start_response)
  File "/usr/lib/python2.7/dist-packages/webob/dec.py", line 159, in
__call__
    return resp(environ, start_response)
  File "/usr/lib/python2.7/dist-packages/routes/middleware.py", line 131,
in __call__
    response = self.app(environ, start_response)
  File "/usr/lib/python2.7/dist-packages/webob/dec.py", line 159, in
__call__
    return resp(environ, start_response)
  File "/usr/lib/python2.7/dist-packages/webob/dec.py", line 147, in
__call__
    resp = self.call_func(req, *args, **self.kwargs)
  File "/usr/lib/python2.7/dist-packages/webob/dec.py", line 210, in
call_func
    return self.func(req, *args, **kwargs)
  File "/usr/lib/python2.7/dist-packages/glance/common/wsgi.py", line 533,
in __call__
    request, **action_args)
  File "/usr/lib/python2.7/dist-packages/glance/common/wsgi.py", line 550,
in dispatch
    return method(*args, **kwargs)
  File "/usr/lib/python2.7/dist-packages/glance/registry/api/v1/images.py",
line 117, in detail
    image_dicts = [make_image_dict(i) for i in images]
  File "/usr/lib/python2.7/dist-packages/glance/registry/api/v1/images.py",
line 447, in make_image_dict
    image_tags = image['tags']
  File "/usr/lib/python2.7/dist-packages/glance/db/sqlalchemy/models.py",
line 77, in __getitem__
    return getattr(self, key)
  File "/usr/lib/python2.7/dist-packages/sqlalchemy/orm/attributes.py",
line 168, in __get__
    return self.impl.get(instance_state(instance),dict_)
  File "/usr/lib/python2.7/dist-packages/sqlalchemy/orm/attributes.py",
line 453, in get
    value = self.callable_(state, passive)
  File "/usr/lib/python2.7/dist-packages/sqlalchemy/orm/strategies.py",
line 481, in _load_for_state
    (mapperutil.state_str(state), self.key)
DetachedInstanceError: Parent instance <Image at 0x352f810> is not bound to
a Session; lazy load operation of attribute 'tags' cannot proceed

Any clue?

Ray
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.openstack.org/pipermail/openstack-dev/attachments/20130515/464f40ae/attachment.html>


More information about the OpenStack-dev mailing list