Glance GET /images/detail DetachedIntanceError on 'tags' attribute
Affects | Status | Importance | Assigned to | Milestone | |
---|---|---|---|---|---|
Glance |
Invalid
|
High
|
Flavio Percoco |
Bug Description
---------- Forwarded message ----------
From: Ray Pekowski <email address hidden>
Date: Wed, May 15, 2013 at 3:51 PM
Subject: Glance GET /images/detail DetachedIntance
To: OpenStack Development Mailing List <email address hidden>
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/
Host: 10.49.56.250:9191
Accept-Encoding: identity
x-openstack-
x-auth-token: 3600d26b1a63488
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/
result = self.applicatio
File "/usr/lib/
return self.app(env, start_response)
File "/usr/lib/
resp = self.call_func(req, *args, **self.kwargs)
File "/usr/lib/
return self.func(req, *args, **kwargs)
File "/usr/lib/
response = req.get_
File "/usr/lib/
application, catch_exc_
File "/usr/lib/
app_iter = application(
File "/usr/lib/
return resp(environ, start_response)
File "/usr/lib/
response = self.app(environ, start_response)
File "/usr/lib/
return resp(environ, start_response)
File "/usr/lib/
resp = self.call_func(req, *args, **self.kwargs)
File "/usr/lib/
return self.func(req, *args, **kwargs)
File "/usr/lib/
request, **action_args)
File "/usr/lib/
return method(*args, **kwargs)
File "/usr/lib/
image_dicts = [make_image_dict(i) for i in images]
File "/usr/lib/
image_tags = image['tags']
File "/usr/lib/
return getattr(self, key)
File "/usr/lib/
return self.impl.
File "/usr/lib/
value = self.callable_
File "/usr/lib/
(mapperutil
DetachedInstanc
Any clue?
Ray
---------- Forwarded message ----------
From: Flavio Percoco <email address hidden>
Date: Thu, May 16, 2013 at 3:27 AM
Subject: Re: [openstack-dev] Glance GET /images/detail DetachedIntance
To: OpenStack Development Mailing List <email address hidden>
On 15/05/13 15:51 -0500, Ray Pekowski wrote:
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:
Any clue?
Yep, that looks like a bug.
TL;DR:
The session attribute is removed from images dictionaries in the
to_dict method[0] and it looks like that's happening before tags are
loaded, which means that it won't be possible to load them since
there's no session and sqlalchemy gets really mad. :D
Please, file a bug for this.
Thanks a lot.
FF
[0]
https:/
Changed in glance: | |
status: | New → Triaged |
importance: | Undecided → High |
assignee: | nobody → Flavio Percoco (flaper87) |
milestone: | none → havana-1 |
Changed in glance: | |
status: | Triaged → Incomplete |
Changed in glance: | |
milestone: | havana-1 → none |
mhh, I was going to work on this but there's something wrong with your report.
What version are you using? I checked master, grizzly and folsom and none of them have:
File "/usr/lib/ python2. 7/dist- packages/ glance/ registry/ api/v1/ images. py", line 447, in make_image_dict
image_tags = image['tags']
And the line bellow is not on line N 117:
image_dicts = [make_image_dict(i) for i in images]
Did you modify that file?
https:/ /github. com/openstack/ glance/ blob/master/ glance/ registry/ api/v1/ images. py#L447
Cheers