BackendException from glance_store causing 500 Internal Server Error
Affects | Status | Importance | Assigned to | Milestone | |
---|---|---|---|---|---|
Glance |
In Progress
|
Undecided
|
Abhishek Kekane |
Bug Description
1.Metadata error:
Passing invalid metadata value to location-add or location-update command raises 500 Internal Server Error.
1). glance location-add <image-id> --url http://
or
2). glance location-update <image-id> --url http://
Stacktrace on g-api:
2015-12-15 03:47:49.876 ERROR glance.common.wsgi [req-3a349a22-
2015-12-15 03:47:49.876 TRACE glance.common.wsgi Traceback (most recent call last):2015-12-15 03:47:49.876 TRACE glance.common.wsgi File "/opt/stack/
2015-12-15 03:47:49.876 TRACE glance.common.wsgi request, **action_args)
2015-12-15 03:47:49.876 TRACE glance.common.wsgi File "/opt/stack/
2015-12-15 03:47:49.876 TRACE glance.common.wsgi return method(*args, **kwargs)
2015-12-15 03:47:49.876 TRACE glance.common.wsgi File "/opt/stack/
2015-12-15 03:47:49.876 TRACE glance.common.wsgi return func(self, req, *args,**kwargs)
2015-12-15 03:47:49.876 TRACE glance.common.wsgi File "/opt/stack/
2015-12-15 03:47:49.876 TRACE glance.common.wsgi change_method(req, image, change)
2015-12-15 03:47:49.876 TRACE glance.common.wsgi File "/opt/stack/
2015-12-15 03:47:49.876 TRACE glance.common.wsgi self._do_
2015-12-15 03:47:49.876 TRACE glance.common.wsgi File "/opt/stack/
2015-12-15 03:47:49.876 TRACE glance.common.wsgi image.locations
2015-12-15 03:47:49.876 TRACE glance.common.wsgi File "/opt/stack/
2015-12-15 03:47:49.876 TRACE glance.common.wsgi return method(*args, **kwargs)
2015-12-15 03:47:49.876 TRACE glance.common.wsgi File "/opt/stack/
2015-12-15 03:47:49.876 TRACE glance.common.wsgi return self.locations.
2015-12-15 03:47:49.876 TRACE glance.common.wsgi File "/opt/stack/
2015-12-15 03:47:49.876 TRACE glance.common.wsgi location)
2015-12-15 03:47:49.876 TRACE glance.common.wsgi File "/opt/stack/
2015-12-15 03:47:49.876 TRACE glance.common.wsgi store_api.
2015-12-15 03:47:49.876 TRACE glance.common.wsgi File "/usr/local/
2015-12-15 03:47:49.876 TRACE glance.common.wsgi check_location_
2015-12-15 03:47:49.876 TRACE glance.common.wsgi File "/usr/local/
2015-12-15 03:47:49.876 TRACE glance.common.wsgi % dict(key=key, type=type(val)))
2015-12-15 03:47:49.876 TRACE glance.common.wsgi BackendException: The image metadata key a has an invalid type of <type 'int'>. Only dict, list, and unicode are supported.
2015-12-15 03:47:49.876 TRACE glance.common.wsgi
2.image-upload error:
when the storage back-end raise BackendException error,Glance doesn't catch it and raise 500 error. Such as if there is no enough space for image store, the back-end(Such as Swift) will sometimes raise a BackendException error.
Reproduce:
1.suppose use Swift back-end, and there is 1G could be use.
2.create an image with 2G.
3.Glance will return 500 error
2015-12-26 08:48:47.534 ERROR glance.common.wsgi [req-ab660c64-
Got error from Swift: put_object(
2015-12-26 08:48:47.534 TRACE glance.common.wsgi Traceback (most recent call last):
2015-12-26 08:48:47.534 TRACE glance.common.wsgi File "/opt/stack/
2015-12-26 08:48:47.534 TRACE glance.common.wsgi request, **action_args)
2015-12-26 08:48:47.534 TRACE glance.common.wsgi File "/opt/stack/
2015-12-26 08:48:47.534 TRACE glance.common.wsgi return method(*args, **kwargs)
2015-12-26 08:48:47.534 TRACE glance.common.wsgi File "/opt/stack/
2015-12-26 08:48:47.534 TRACE glance.common.wsgi return func(self, req, *args, **kwargs)
2015-12-26 08:48:47.534 TRACE glance.common.wsgi File "/opt/stack/
2015-12-26 08:48:47.534 TRACE glance.common.wsgi self._restore(
2015-12-26 08:48:47.534 TRACE glance.common.wsgi File "/usr/local/
2015-12-26 08:48:47.534 TRACE glance.common.wsgi six.reraise(
2015-12-26 08:48:47.534 TRACE glance.common.wsgi File "/opt/stack/
2015-12-26 08:48:47.534 TRACE glance.common.wsgi image.set_
2015-12-26 08:48:47.534 TRACE glance.common.wsgi File "/opt/stack/
2015-12-26 08:48:47.534 TRACE glance.common.wsgi self.base.
2015-12-26 08:48:47.534 TRACE glance.common.wsgi File "/opt/stack/
2015-12-26 08:48:47.534 TRACE glance.common.wsgi _send_notificat
2015-12-26 08:48:47.534 TRACE glance.common.wsgi File "/usr/local/
2015-12-26 08:48:47.534 TRACE glance.common.wsgi six.reraise(
2015-12-26 08:48:47.534 TRACE glance.common.wsgi File "/opt/stack/
2015-12-26 08:48:47.534 TRACE glance.common.wsgi self.repo.
2015-12-26 08:48:47.534 TRACE glance.common.wsgi File "/opt/stack/
2015-12-26 08:48:47.534 TRACE glance.common.wsgi return self.image.
2015-12-26 08:48:47.534 TRACE glance.common.wsgi File "/opt/stack/
2015-12-26 08:48:47.534 TRACE glance.common.wsgi self.image.
2015-12-26 08:48:47.534 TRACE glance.common.wsgi File "/opt/stack/
2015-12-26 08:48:47.534 TRACE glance.common.wsgi context=
2015-12-26 08:48:47.534 TRACE glance.common.wsgi File "/opt/stack/
2015-12-26 08:48:47.534 TRACE glance.common.wsgi return store_add_
2015-12-26 08:48:47.534 TRACE glance.common.wsgi File "/opt/stack/
2015-12-26 08:48:47.534 TRACE glance.common.wsgi context=context)
2015-12-26 08:48:47.534 TRACE glance.common.wsgi File "/opt/stack/
2015-12-26 08:48:47.534 TRACE glance.common.wsgi return store_op_fun(store, *args, **kwargs)
2015-12-26 08:48:47.534 TRACE glance.common.wsgi File "/opt/stack/
2015-12-26 08:48:47.534 TRACE glance.common.wsgi raise glance_
2015-12-26 08:48:47.534 TRACE glance.common.wsgi BackendException: Failed to add object to Swift.
2015-12-26 08:48:47.534 TRACE glance.common.wsgi Got error from Swift: put_object(
Changed in glance: | |
assignee: | nobody → Abhishek Kekane (abhishek-kekane) |
description: | updated |
Fix proposed to branch: master /review. openstack. org/259963
Review: https:/