Glance v2: HTTP500 when updating image with locations
Affects | Status | Importance | Assigned to | Milestone | |
---|---|---|---|---|---|
Glance |
Fix Released
|
High
|
Feilong Wang |
Bug Description
curl -i -X PATCH -H "X-Auth-Token: $AUTH_TOKEN" -H 'Content-Type: application/
HTTP/1.1 500 Internal Server Error
2013-12-03 22:14:39.298 12510 INFO glance.wsgi.server [85024f66-
File "/usr/local/
result = self.applicatio
File "/usr/local/
resp = self.call_func(req, *args, **self.kwargs)
File "/usr/local/
return self.func(req, *args, **kwargs)
File "/opt/stack/
response = req.get_
File "/usr/local/
application, catch_exc_
File "/usr/local/
app_iter = application(
File "/opt/stack/
return self.app(env, start_response)
File "/usr/local/
resp = self.call_func(req, *args, **self.kwargs)
File "/usr/local/
return self.func(req, *args, **kwargs)
File "/opt/stack/
response = req.get_
File "/usr/local/
application, catch_exc_
File "/usr/local/
app_iter = application(
File "/usr/local/
resp = self.call_func(req, *args, **self.kwargs)
File "/usr/local/
return self.func(req, *args, **kwargs)
File "/opt/stack/
response = req.get_
File "/usr/local/
application, catch_exc_
File "/usr/local/
app_iter = application(
File "/usr/local/
resp = self.call_func(req, *args, **self.kwargs)
File "/usr/local/
return self.func(req, *args, **kwargs)
File "/opt/stack/
response = req.get_
File "/usr/local/
application, catch_exc_
File "/usr/local/
app_iter = application(
File "/usr/lib/
return app(environ, start_response)
File "/usr/local/
return resp(environ, start_response)
File "/usr/lib/
response = self.app(environ, start_response)
File "/usr/local/
return resp(environ, start_response)
File "/usr/local/
resp = self.call_func(req, *args, **self.kwargs)
File "/usr/local/
return self.func(req, *args, **kwargs)
File "/opt/stack/
request, **action_args)
File "/opt/stack/
return method(*args, **kwargs)
File "/opt/stack/
return func(self, req, *args, **kwargs)
File "/opt/stack/
change_
File "/opt/stack/
self.
File "/opt/stack/
image.locations = value
File "/opt/stack/
return setattr(
File "/opt/stack/
return setattr(
File "/opt/stack/
self.
File "/opt/stack/
self.context, self.image.size * len(value), self.db_api,
TypeError: unsupported operand type(s) for *: 'NoneType' and 'int'
2013-12-03 22:14:39.301 12510 INFO glance.wsgi.server [85024f66-
Changed in glance: | |
status: | New → Confirmed |
assignee: | nobody → Fei Long Wang (flwang) |
Changed in glance: | |
status: | Confirmed → In Progress |
Changed in glance: | |
milestone: | none → icehouse-2 |
status: | Fix Committed → Fix Released |
Changed in glance: | |
milestone: | icehouse-2 → 2014.1 |
@ameade, good catch. And I can reprodce it in my local environment. My test steps is as below. Please let me know if you did as the same way.
1. Create an image without specifying the data or location
2. Update locations against the image just create with PATCH
After investigated the code, I think the root cause is there is no image size when check the quota. So we will run into the TypeError exception.