yahoo-eng-team team mailing list archive
-
yahoo-eng-team team
-
Mailing list archive
-
Message #33769
[Bug 1465510] [NEW] image-create api returns 500 error if propery name exceeds 255 characters
Public bug reported:
If you pass property name with more than 255 characters to the image-
create/image-update api, then it returns 500 error to the user.
$glance image-create --disk-format ami --container-format ami --file data.txt --property <more than 255 characters>=value
HTTPInternalServerError (HTTP 500)
glance-api error log:
2015-06-15 23:43:43.400 ERROR glance.registry.client.v1.client [req-60529339-e52e-4d2d-8f3b-5f4b
cd48d6f5 bc22d530424c45ec9bb823d290f28ff5 a7e24449d3394fefbf029d3ce7a08562] Registry client requ
est POST /images raised ServerError
2015-06-15 23:43:43.400 TRACE glance.registry.client.v1.client Traceback (most recent call last)
:
2015-06-15 23:43:43.400 TRACE glance.registry.client.v1.client File /opt/stack/glance/glance/
registry/client/v1/client.py", line 122, in do_request
2015-06-15 23:43:43.400 TRACE glance.registry.client.v1.client **kwargs)
2015-06-15 23:43:43.400 TRACE glance.registry.client.v1.client File "/opt/stack/glance/glance/
common/client.py", line 71, in wrapped
2015-06-15 23:43:43.400 TRACE glance.registry.client.v1.client return func(self, *args, **kw
args)
2015-06-15 23:43:43.400 TRACE glance.registry.client.v1.client File "/opt/stack/glance/glance/
common/client.py", line 377, in do_request
2015-06-15 23:43:43.400 TRACE glance.registry.client.v1.client headers=copy.deepcopy(headers
))
2015-06-15 23:43:43.400 TRACE glance.registry.client.v1.client File "/opt/stack/glance/glance/
common/client.py", line 88, in wrapped
2015-06-15 23:43:43.400 TRACE glance.registry.client.v1.client return func(self, method, url
, body, headers)
2015-06-15 23:43:43.400 TRACE glance.registry.client.v1.client File "/opt/stack/glance/glance/
common/client.py", line 534, in _do_request
2015-06-15 23:43:43.400 TRACE glance.registry.client.v1.client raise exception.ServerError()
2015-06-15 23:43:43.400 TRACE glance.registry.client.v1.client ServerError: The request returned
500 Internal Server Error.
2015-06-15 23:43:43.400 TRACE glance.registry.client.v1.client
2015-06-15 23:43:43.622 INFO eventlet.wsgi.server [req-60529339-e52e-4d2d-8f3b-5f4bcd48d6f5 bc22
d530424c45ec9bb823d290f28ff5 a7e24449d3394fefbf029d3ce7a08562] Traceback (most recent call last)
:
File "/usr/local/lib/python2.7/dist-packages/eventlet/wsgi.py", line 454, in handle_one_respon
se
result = self.application(self.environ, start_response)
File "/usr/lib/python2.7/dist-packages/webob/dec.py", line 130, in __call__
resp = self.call_func(req, *args, **self.kwargs)
File "/usr/lib/python2.7/dist-packages/webob/dec.py", line 195, in call_func
return self.func(req, *args, **kwargs)
File "/opt/stack/glance/glance/common/wsgi.py", line 582, in __call__
response = req.get_response(self.application)
File "/usr/lib/python2.7/dist-packages/webob/request.py", line 1320, in send
application, catch_exc_info=False)
File "/usr/lib/python2.7/dist-packages/webob/request.py", line 1284, in call_application
app_iter = application(self.environ, start_response)
File "/usr/lib/python2.7/dist-packages/webob/dec.py", line 130, in __call__
resp = self.call_func(req, *args, **self.kwargs)
File "/usr/lib/python2.7/dist-packages/webob/dec.py", line 195, in call_func
return self.func(req, *args, **kwargs)
File "/usr/local/lib/python2.7/dist-packages/osprofiler/web.py", line 99, in __call__
return request.get_response(self.application)
File "/usr/lib/python2.7/dist-packages/webob/request.py", line 1320, in send
application, catch_exc_info=False)
File "/usr/lib/python2.7/dist-packages/webob/request.py", line 1284, in call_application
app_iter = application(self.environ, start_response)
File "/usr/local/lib/python2.7/dist-packages/keystonemiddleware/auth_token/__init__.py", line 644, in __call__
return self._call_app(env, start_response)
File "/usr/local/lib/python2.7/dist-packages/keystonemiddleware/auth_token/__init__.py", line 560, in _call_app
return self._app(env, _fake_start_response)
File "/usr/lib/python2.7/dist-packages/webob/dec.py", line 130, in __call__
resp = self.call_func(req, *args, **self.kwargs)
File "/usr/lib/python2.7/dist-packages/webob/dec.py", line 195, in call_func
return self.func(req, *args, **kwargs)
File "/opt/stack/glance/glance/common/wsgi.py", line 582, in __call__
response = req.get_response(self.application)
File "/usr/lib/python2.7/dist-packages/webob/request.py", line 1320, in send
application, catch_exc_info=False)
File "/usr/lib/python2.7/dist-packages/webob/request.py", line 1284, in call_application
app_iter = application(self.environ, start_response)
File "/usr/lib/python2.7/dist-packages/webob/dec.py", line 130, in __call__
resp = self.call_func(req, *args, **self.kwargs)
File "/usr/lib/python2.7/dist-packages/webob/dec.py", line 195, in call_func
return self.func(req, *args, **kwargs)
File "/opt/stack/glance/glance/common/wsgi.py", line 582, in __call__
response = req.get_response(self.application)
File "/usr/lib/python2.7/dist-packages/webob/request.py", line 1320, in send
application, catch_exc_info=False)
File "/usr/lib/python2.7/dist-packages/webob/request.py", line 1284, in call_application
app_iter = application(self.environ, start_response)
File "/usr/lib/python2.7/dist-packages/webob/dec.py", line 130, in __call__
resp = self.call_func(req, *args, **self.kwargs)
File "/usr/lib/python2.7/dist-packages/webob/dec.py", line 195, in call_func
return self.func(req, *args, **kwargs)
File "/opt/stack/glance/glance/common/wsgi.py", line 582, in __call__
response = req.get_response(self.application)
File "/usr/lib/python2.7/dist-packages/webob/request.py", line 1320, in send
application, catch_exc_info=False)
File "/usr/lib/python2.7/dist-packages/webob/request.py", line 1284, in call_application
app_iter = application(self.environ, start_response)
File "/usr/lib/python2.7/dist-packages/paste/urlmap.py", line 206, in __call__
return app(environ, start_response)
File "/usr/lib/python2.7/dist-packages/webob/dec.py", line 144, in __call__
return resp(environ, start_response)
File "/usr/local/lib/python2.7/dist-packages/routes/middleware.py", line 136, in __call__
response = self.app(environ, start_response)
File "/usr/lib/python2.7/dist-packages/webob/dec.py", line 144, in __call__
return resp(environ, start_response)
File "/usr/lib/python2.7/dist-packages/webob/dec.py", line 130, in __call__
resp = self.call_func(req, *args, **self.kwargs)
File "/usr/lib/python2.7/dist-packages/webob/dec.py", line 195, in call_func
return self.func(req, *args, **kwargs)
File "/opt/stack/glance/glance/common/wsgi.py", line 873, in __call__
request, **action_args)
File "/opt/stack/glance/glance/common/wsgi.py", line 897, in dispatch
return method(*args, **kwargs)
File "/opt/stack/glance/glance/common/utils.py", line 508, in wrapped
return func(self, req, *args, **kwargs)
File "/opt/stack/glance/glance/api/v1/images.py", line 868, in create
image_meta = self._reserve(req, image_meta)
File "/opt/stack/glance/glance/api/v1/images.py", line 554, in _reserve
image_meta = registry.add_image_metadata(req.context, image_meta)
File "/opt/stack/glance/glance/registry/client/v1/api.py", line 166, in add_image_metadata
return c.add_image(image_meta)
File "/opt/stack/glance/glance/registry/client/v1/client.py", line 178, in add_image
res = self.do_request("POST", "/images", body=body, headers=headers)
File "/opt/stack/glance/glance/registry/client/v1/client.py", line 137, in do_request
'exc_name': exc_name})
File "/usr/local/lib/python2.7/dist-packages/oslo_utils/excutils.py", line 85, in __exit__
six.reraise(self.type_, self.value, self.tb)
File "/opt/stack/glance/glance/registry/client/v1/client.py", line 122, in do_request
**kwargs)
File "/opt/stack/glance/glance/common/client.py", line 71, in wrapped
return func(self, *args, **kwargs)
File "/opt/stack/glance/glance/common/client.py", line 377, in do_request
headers=copy.deepcopy(headers))
File "/opt/stack/glance/glance/common/client.py", line 88, in wrapped
return func(self, method, url, body, headers)
File "/opt/stack/glance/glance/common/client.py", line 534, in _do_request
raise exception.ServerError()
ServerError: The request returned 500 Internal Server Error.
2015-06-15 23:43:51.933 INFO eventlet.wsgi.server [req-60529339-e52e-
4d2d-8f3b-5f4bcd48d6f5 bc22d530424c45ec9bb823d290f28ff5
a7e24449d3394fefbf029d3ce7a08562] 10.69.4.179 - - [15/Jun/2015 23:43:51]
"POST /v1/images HTTP/1.1" 500 139 9.597818
** Affects: glance
Importance: Undecided
Assignee: Abhijeet Malawade (abhijeet-malawade)
Status: New
** Description changed:
- f you pass property name with more than 255 characters to the image-
+ If you pass property name with more than 255 characters to the image-
create/image-update api, then it returns 500 error to the user.
$glance image-create --disk-format ami --container-format ami --file data.txt --property <more than 255 characters>=value
HTTPInternalServerError (HTTP 500)
glance-api error log:
2015-06-15 23:43:43.400 ERROR glance.registry.client.v1.client [req-60529339-e52e-4d2d-8f3b-5f4b
cd48d6f5 bc22d530424c45ec9bb823d290f28ff5 a7e24449d3394fefbf029d3ce7a08562] Registry client requ
est POST /images raised ServerError
2015-06-15 23:43:43.400 TRACE glance.registry.client.v1.client Traceback (most recent call last)
:
- 2015-06-15 23:43:43.400 TRACE glance.registry.client.v1.client File "/opt/stack/glance/glance/
+ 2015-06-15 23:43:43.400 TRACE glance.registry.client.v1.client File /opt/stack/glance/glance/
registry/client/v1/client.py", line 122, in do_request
2015-06-15 23:43:43.400 TRACE glance.registry.client.v1.client **kwargs)
2015-06-15 23:43:43.400 TRACE glance.registry.client.v1.client File "/opt/stack/glance/glance/
common/client.py", line 71, in wrapped
2015-06-15 23:43:43.400 TRACE glance.registry.client.v1.client return func(self, *args, **kw
args)
2015-06-15 23:43:43.400 TRACE glance.registry.client.v1.client File "/opt/stack/glance/glance/
common/client.py", line 377, in do_request
2015-06-15 23:43:43.400 TRACE glance.registry.client.v1.client headers=copy.deepcopy(headers
))
2015-06-15 23:43:43.400 TRACE glance.registry.client.v1.client File "/opt/stack/glance/glance/
common/client.py", line 88, in wrapped
2015-06-15 23:43:43.400 TRACE glance.registry.client.v1.client return func(self, method, url
, body, headers)
2015-06-15 23:43:43.400 TRACE glance.registry.client.v1.client File "/opt/stack/glance/glance/
common/client.py", line 534, in _do_request
2015-06-15 23:43:43.400 TRACE glance.registry.client.v1.client raise exception.ServerError()
2015-06-15 23:43:43.400 TRACE glance.registry.client.v1.client ServerError: The request returned
- 500 Internal Server Error.
-
+ 500 Internal Server Error.
+
2015-06-15 23:43:43.400 TRACE glance.registry.client.v1.client
2015-06-15 23:43:43.622 INFO eventlet.wsgi.server [req-60529339-e52e-4d2d-8f3b-5f4bcd48d6f5 bc22
d530424c45ec9bb823d290f28ff5 a7e24449d3394fefbf029d3ce7a08562] Traceback (most recent call last)
:
- File "/usr/local/lib/python2.7/dist-packages/eventlet/wsgi.py", line 454, in handle_one_respon
+ File "/usr/local/lib/python2.7/dist-packages/eventlet/wsgi.py", line 454, in handle_one_respon
se
- result = self.application(self.environ, start_response)
- File "/usr/lib/python2.7/dist-packages/webob/dec.py", line 130, in __call__
- resp = self.call_func(req, *args, **self.kwargs)
- File "/usr/lib/python2.7/dist-packages/webob/dec.py", line 195, in call_func
- return self.func(req, *args, **kwargs)
- File "/opt/stack/glance/glance/common/wsgi.py", line 582, in __call__
- response = req.get_response(self.application)
- File "/usr/lib/python2.7/dist-packages/webob/request.py", line 1320, in send
- application, catch_exc_info=False)
- File "/usr/lib/python2.7/dist-packages/webob/request.py", line 1284, in call_application
- app_iter = application(self.environ, start_response)
- File "/usr/lib/python2.7/dist-packages/webob/dec.py", line 130, in __call__
- resp = self.call_func(req, *args, **self.kwargs)
- File "/usr/lib/python2.7/dist-packages/webob/dec.py", line 195, in call_func
- return self.func(req, *args, **kwargs)
- File "/usr/local/lib/python2.7/dist-packages/osprofiler/web.py", line 99, in __call__
- return request.get_response(self.application)
- File "/usr/lib/python2.7/dist-packages/webob/request.py", line 1320, in send
- application, catch_exc_info=False)
- File "/usr/lib/python2.7/dist-packages/webob/request.py", line 1284, in call_application
- app_iter = application(self.environ, start_response)
- File "/usr/local/lib/python2.7/dist-packages/keystonemiddleware/auth_token/__init__.py", line 644, in __call__
- return self._call_app(env, start_response)
- File "/usr/local/lib/python2.7/dist-packages/keystonemiddleware/auth_token/__init__.py", line 560, in _call_app
- return self._app(env, _fake_start_response)
- File "/usr/lib/python2.7/dist-packages/webob/dec.py", line 130, in __call__
- resp = self.call_func(req, *args, **self.kwargs)
- File "/usr/lib/python2.7/dist-packages/webob/dec.py", line 195, in call_func
- return self.func(req, *args, **kwargs)
- File "/opt/stack/glance/glance/common/wsgi.py", line 582, in __call__
- response = req.get_response(self.application)
- File "/usr/lib/python2.7/dist-packages/webob/request.py", line 1320, in send
- application, catch_exc_info=False)
- File "/usr/lib/python2.7/dist-packages/webob/request.py", line 1284, in call_application
- app_iter = application(self.environ, start_response)
- File "/usr/lib/python2.7/dist-packages/webob/dec.py", line 130, in __call__
- resp = self.call_func(req, *args, **self.kwargs)
- File "/usr/lib/python2.7/dist-packages/webob/dec.py", line 195, in call_func
- return self.func(req, *args, **kwargs)
- File "/opt/stack/glance/glance/common/wsgi.py", line 582, in __call__
- response = req.get_response(self.application)
- File "/usr/lib/python2.7/dist-packages/webob/request.py", line 1320, in send
- application, catch_exc_info=False)
- File "/usr/lib/python2.7/dist-packages/webob/request.py", line 1284, in call_application
- app_iter = application(self.environ, start_response)
- File "/usr/lib/python2.7/dist-packages/webob/dec.py", line 130, in __call__
- resp = self.call_func(req, *args, **self.kwargs)
- File "/usr/lib/python2.7/dist-packages/webob/dec.py", line 195, in call_func
- return self.func(req, *args, **kwargs)
- File "/opt/stack/glance/glance/common/wsgi.py", line 582, in __call__
- response = req.get_response(self.application)
- File "/usr/lib/python2.7/dist-packages/webob/request.py", line 1320, in send
- application, catch_exc_info=False)
- File "/usr/lib/python2.7/dist-packages/webob/request.py", line 1284, in call_application
- app_iter = application(self.environ, start_response)
- File "/usr/lib/python2.7/dist-packages/paste/urlmap.py", line 206, in __call__
- return app(environ, start_response)
- File "/usr/lib/python2.7/dist-packages/webob/dec.py", line 144, in __call__
- return resp(environ, start_response)
- File "/usr/local/lib/python2.7/dist-packages/routes/middleware.py", line 136, in __call__
- response = self.app(environ, start_response)
- File "/usr/lib/python2.7/dist-packages/webob/dec.py", line 144, in __call__
- return resp(environ, start_response)
- File "/usr/lib/python2.7/dist-packages/webob/dec.py", line 130, in __call__
- resp = self.call_func(req, *args, **self.kwargs)
- File "/usr/lib/python2.7/dist-packages/webob/dec.py", line 195, in call_func
- return self.func(req, *args, **kwargs)
- File "/opt/stack/glance/glance/common/wsgi.py", line 873, in __call__
- request, **action_args)
- File "/opt/stack/glance/glance/common/wsgi.py", line 897, in dispatch
- return method(*args, **kwargs)
- File "/opt/stack/glance/glance/common/utils.py", line 508, in wrapped
- return func(self, req, *args, **kwargs)
- File "/opt/stack/glance/glance/api/v1/images.py", line 868, in create
- image_meta = self._reserve(req, image_meta)
- File "/opt/stack/glance/glance/api/v1/images.py", line 554, in _reserve
- image_meta = registry.add_image_metadata(req.context, image_meta)
- File "/opt/stack/glance/glance/registry/client/v1/api.py", line 166, in add_image_metadata
- return c.add_image(image_meta)
- File "/opt/stack/glance/glance/registry/client/v1/client.py", line 178, in add_image
- res = self.do_request("POST", "/images", body=body, headers=headers)
- File "/opt/stack/glance/glance/registry/client/v1/client.py", line 137, in do_request
- 'exc_name': exc_name})
- File "/usr/local/lib/python2.7/dist-packages/oslo_utils/excutils.py", line 85, in __exit__
- six.reraise(self.type_, self.value, self.tb)
- File "/opt/stack/glance/glance/registry/client/v1/client.py", line 122, in do_request
- **kwargs)
- File "/opt/stack/glance/glance/common/client.py", line 71, in wrapped
- return func(self, *args, **kwargs)
- File "/opt/stack/glance/glance/common/client.py", line 377, in do_request
- headers=copy.deepcopy(headers))
- File "/opt/stack/glance/glance/common/client.py", line 88, in wrapped
- return func(self, method, url, body, headers)
- File "/opt/stack/glance/glance/common/client.py", line 534, in _do_request
- raise exception.ServerError()
+ result = self.application(self.environ, start_response)
+ File "/usr/lib/python2.7/dist-packages/webob/dec.py", line 130, in __call__
+ resp = self.call_func(req, *args, **self.kwargs)
+ File "/usr/lib/python2.7/dist-packages/webob/dec.py", line 195, in call_func
+ return self.func(req, *args, **kwargs)
+ File "/opt/stack/glance/glance/common/wsgi.py", line 582, in __call__
+ response = req.get_response(self.application)
+ File "/usr/lib/python2.7/dist-packages/webob/request.py", line 1320, in send
+ application, catch_exc_info=False)
+ File "/usr/lib/python2.7/dist-packages/webob/request.py", line 1284, in call_application
+ app_iter = application(self.environ, start_response)
+ File "/usr/lib/python2.7/dist-packages/webob/dec.py", line 130, in __call__
+ resp = self.call_func(req, *args, **self.kwargs)
+ File "/usr/lib/python2.7/dist-packages/webob/dec.py", line 195, in call_func
+ return self.func(req, *args, **kwargs)
+ File "/usr/local/lib/python2.7/dist-packages/osprofiler/web.py", line 99, in __call__
+ return request.get_response(self.application)
+ File "/usr/lib/python2.7/dist-packages/webob/request.py", line 1320, in send
+ application, catch_exc_info=False)
+ File "/usr/lib/python2.7/dist-packages/webob/request.py", line 1284, in call_application
+ app_iter = application(self.environ, start_response)
+ File "/usr/local/lib/python2.7/dist-packages/keystonemiddleware/auth_token/__init__.py", line 644, in __call__
+ return self._call_app(env, start_response)
+ File "/usr/local/lib/python2.7/dist-packages/keystonemiddleware/auth_token/__init__.py", line 560, in _call_app
+ return self._app(env, _fake_start_response)
+ File "/usr/lib/python2.7/dist-packages/webob/dec.py", line 130, in __call__
+ resp = self.call_func(req, *args, **self.kwargs)
+ File "/usr/lib/python2.7/dist-packages/webob/dec.py", line 195, in call_func
+ return self.func(req, *args, **kwargs)
+ File "/opt/stack/glance/glance/common/wsgi.py", line 582, in __call__
+ response = req.get_response(self.application)
+ File "/usr/lib/python2.7/dist-packages/webob/request.py", line 1320, in send
+ application, catch_exc_info=False)
+ File "/usr/lib/python2.7/dist-packages/webob/request.py", line 1284, in call_application
+ app_iter = application(self.environ, start_response)
+ File "/usr/lib/python2.7/dist-packages/webob/dec.py", line 130, in __call__
+ resp = self.call_func(req, *args, **self.kwargs)
+ File "/usr/lib/python2.7/dist-packages/webob/dec.py", line 195, in call_func
+ return self.func(req, *args, **kwargs)
+ File "/opt/stack/glance/glance/common/wsgi.py", line 582, in __call__
+ response = req.get_response(self.application)
+ File "/usr/lib/python2.7/dist-packages/webob/request.py", line 1320, in send
+ application, catch_exc_info=False)
+ File "/usr/lib/python2.7/dist-packages/webob/request.py", line 1284, in call_application
+ app_iter = application(self.environ, start_response)
+ File "/usr/lib/python2.7/dist-packages/webob/dec.py", line 130, in __call__
+ resp = self.call_func(req, *args, **self.kwargs)
+ File "/usr/lib/python2.7/dist-packages/webob/dec.py", line 195, in call_func
+ return self.func(req, *args, **kwargs)
+ File "/opt/stack/glance/glance/common/wsgi.py", line 582, in __call__
+ response = req.get_response(self.application)
+ File "/usr/lib/python2.7/dist-packages/webob/request.py", line 1320, in send
+ application, catch_exc_info=False)
+ File "/usr/lib/python2.7/dist-packages/webob/request.py", line 1284, in call_application
+ app_iter = application(self.environ, start_response)
+ File "/usr/lib/python2.7/dist-packages/paste/urlmap.py", line 206, in __call__
+ return app(environ, start_response)
+ File "/usr/lib/python2.7/dist-packages/webob/dec.py", line 144, in __call__
+ return resp(environ, start_response)
+ File "/usr/local/lib/python2.7/dist-packages/routes/middleware.py", line 136, in __call__
+ response = self.app(environ, start_response)
+ File "/usr/lib/python2.7/dist-packages/webob/dec.py", line 144, in __call__
+ return resp(environ, start_response)
+ File "/usr/lib/python2.7/dist-packages/webob/dec.py", line 130, in __call__
+ resp = self.call_func(req, *args, **self.kwargs)
+ File "/usr/lib/python2.7/dist-packages/webob/dec.py", line 195, in call_func
+ return self.func(req, *args, **kwargs)
+ File "/opt/stack/glance/glance/common/wsgi.py", line 873, in __call__
+ request, **action_args)
+ File "/opt/stack/glance/glance/common/wsgi.py", line 897, in dispatch
+ return method(*args, **kwargs)
+ File "/opt/stack/glance/glance/common/utils.py", line 508, in wrapped
+ return func(self, req, *args, **kwargs)
+ File "/opt/stack/glance/glance/api/v1/images.py", line 868, in create
+ image_meta = self._reserve(req, image_meta)
+ File "/opt/stack/glance/glance/api/v1/images.py", line 554, in _reserve
+ image_meta = registry.add_image_metadata(req.context, image_meta)
+ File "/opt/stack/glance/glance/registry/client/v1/api.py", line 166, in add_image_metadata
+ return c.add_image(image_meta)
+ File "/opt/stack/glance/glance/registry/client/v1/client.py", line 178, in add_image
+ res = self.do_request("POST", "/images", body=body, headers=headers)
+ File "/opt/stack/glance/glance/registry/client/v1/client.py", line 137, in do_request
+ 'exc_name': exc_name})
+ File "/usr/local/lib/python2.7/dist-packages/oslo_utils/excutils.py", line 85, in __exit__
+ six.reraise(self.type_, self.value, self.tb)
+ File "/opt/stack/glance/glance/registry/client/v1/client.py", line 122, in do_request
+ **kwargs)
+ File "/opt/stack/glance/glance/common/client.py", line 71, in wrapped
+ return func(self, *args, **kwargs)
+ File "/opt/stack/glance/glance/common/client.py", line 377, in do_request
+ headers=copy.deepcopy(headers))
+ File "/opt/stack/glance/glance/common/client.py", line 88, in wrapped
+ return func(self, method, url, body, headers)
+ File "/opt/stack/glance/glance/common/client.py", line 534, in _do_request
+ raise exception.ServerError()
ServerError: The request returned 500 Internal Server Error.
2015-06-15 23:43:51.933 INFO eventlet.wsgi.server [req-60529339-e52e-
4d2d-8f3b-5f4bcd48d6f5 bc22d530424c45ec9bb823d290f28ff5
a7e24449d3394fefbf029d3ce7a08562] 10.69.4.179 - - [15/Jun/2015 23:43:51]
"POST /v1/images HTTP/1.1" 500 139 9.597818
** Changed in: glance
Assignee: (unassigned) => Abhijeet Malawade (abhijeet-malawade)
--
You received this bug notification because you are a member of Yahoo!
Engineering Team, which is subscribed to Glance.
https://bugs.launchpad.net/bugs/1465510
Title:
image-create api returns 500 error if propery name exceeds 255
characters
Status in OpenStack Image Registry and Delivery Service (Glance):
New
Bug description:
If you pass property name with more than 255 characters to the image-
create/image-update api, then it returns 500 error to the user.
$glance image-create --disk-format ami --container-format ami --file data.txt --property <more than 255 characters>=value
HTTPInternalServerError (HTTP 500)
glance-api error log:
2015-06-15 23:43:43.400 ERROR glance.registry.client.v1.client [req-60529339-e52e-4d2d-8f3b-5f4b
cd48d6f5 bc22d530424c45ec9bb823d290f28ff5 a7e24449d3394fefbf029d3ce7a08562] Registry client requ
est POST /images raised ServerError
2015-06-15 23:43:43.400 TRACE glance.registry.client.v1.client Traceback (most recent call last)
:
2015-06-15 23:43:43.400 TRACE glance.registry.client.v1.client File /opt/stack/glance/glance/
registry/client/v1/client.py", line 122, in do_request
2015-06-15 23:43:43.400 TRACE glance.registry.client.v1.client **kwargs)
2015-06-15 23:43:43.400 TRACE glance.registry.client.v1.client File "/opt/stack/glance/glance/
common/client.py", line 71, in wrapped
2015-06-15 23:43:43.400 TRACE glance.registry.client.v1.client return func(self, *args, **kw
args)
2015-06-15 23:43:43.400 TRACE glance.registry.client.v1.client File "/opt/stack/glance/glance/
common/client.py", line 377, in do_request
2015-06-15 23:43:43.400 TRACE glance.registry.client.v1.client headers=copy.deepcopy(headers
))
2015-06-15 23:43:43.400 TRACE glance.registry.client.v1.client File "/opt/stack/glance/glance/
common/client.py", line 88, in wrapped
2015-06-15 23:43:43.400 TRACE glance.registry.client.v1.client return func(self, method, url
, body, headers)
2015-06-15 23:43:43.400 TRACE glance.registry.client.v1.client File "/opt/stack/glance/glance/
common/client.py", line 534, in _do_request
2015-06-15 23:43:43.400 TRACE glance.registry.client.v1.client raise exception.ServerError()
2015-06-15 23:43:43.400 TRACE glance.registry.client.v1.client ServerError: The request returned
500 Internal Server Error.
2015-06-15 23:43:43.400 TRACE glance.registry.client.v1.client
2015-06-15 23:43:43.622 INFO eventlet.wsgi.server [req-60529339-e52e-4d2d-8f3b-5f4bcd48d6f5 bc22
d530424c45ec9bb823d290f28ff5 a7e24449d3394fefbf029d3ce7a08562] Traceback (most recent call last)
:
File "/usr/local/lib/python2.7/dist-packages/eventlet/wsgi.py", line 454, in handle_one_respon
se
result = self.application(self.environ, start_response)
File "/usr/lib/python2.7/dist-packages/webob/dec.py", line 130, in __call__
resp = self.call_func(req, *args, **self.kwargs)
File "/usr/lib/python2.7/dist-packages/webob/dec.py", line 195, in call_func
return self.func(req, *args, **kwargs)
File "/opt/stack/glance/glance/common/wsgi.py", line 582, in __call__
response = req.get_response(self.application)
File "/usr/lib/python2.7/dist-packages/webob/request.py", line 1320, in send
application, catch_exc_info=False)
File "/usr/lib/python2.7/dist-packages/webob/request.py", line 1284, in call_application
app_iter = application(self.environ, start_response)
File "/usr/lib/python2.7/dist-packages/webob/dec.py", line 130, in __call__
resp = self.call_func(req, *args, **self.kwargs)
File "/usr/lib/python2.7/dist-packages/webob/dec.py", line 195, in call_func
return self.func(req, *args, **kwargs)
File "/usr/local/lib/python2.7/dist-packages/osprofiler/web.py", line 99, in __call__
return request.get_response(self.application)
File "/usr/lib/python2.7/dist-packages/webob/request.py", line 1320, in send
application, catch_exc_info=False)
File "/usr/lib/python2.7/dist-packages/webob/request.py", line 1284, in call_application
app_iter = application(self.environ, start_response)
File "/usr/local/lib/python2.7/dist-packages/keystonemiddleware/auth_token/__init__.py", line 644, in __call__
return self._call_app(env, start_response)
File "/usr/local/lib/python2.7/dist-packages/keystonemiddleware/auth_token/__init__.py", line 560, in _call_app
return self._app(env, _fake_start_response)
File "/usr/lib/python2.7/dist-packages/webob/dec.py", line 130, in __call__
resp = self.call_func(req, *args, **self.kwargs)
File "/usr/lib/python2.7/dist-packages/webob/dec.py", line 195, in call_func
return self.func(req, *args, **kwargs)
File "/opt/stack/glance/glance/common/wsgi.py", line 582, in __call__
response = req.get_response(self.application)
File "/usr/lib/python2.7/dist-packages/webob/request.py", line 1320, in send
application, catch_exc_info=False)
File "/usr/lib/python2.7/dist-packages/webob/request.py", line 1284, in call_application
app_iter = application(self.environ, start_response)
File "/usr/lib/python2.7/dist-packages/webob/dec.py", line 130, in __call__
resp = self.call_func(req, *args, **self.kwargs)
File "/usr/lib/python2.7/dist-packages/webob/dec.py", line 195, in call_func
return self.func(req, *args, **kwargs)
File "/opt/stack/glance/glance/common/wsgi.py", line 582, in __call__
response = req.get_response(self.application)
File "/usr/lib/python2.7/dist-packages/webob/request.py", line 1320, in send
application, catch_exc_info=False)
File "/usr/lib/python2.7/dist-packages/webob/request.py", line 1284, in call_application
app_iter = application(self.environ, start_response)
File "/usr/lib/python2.7/dist-packages/webob/dec.py", line 130, in __call__
resp = self.call_func(req, *args, **self.kwargs)
File "/usr/lib/python2.7/dist-packages/webob/dec.py", line 195, in call_func
return self.func(req, *args, **kwargs)
File "/opt/stack/glance/glance/common/wsgi.py", line 582, in __call__
response = req.get_response(self.application)
File "/usr/lib/python2.7/dist-packages/webob/request.py", line 1320, in send
application, catch_exc_info=False)
File "/usr/lib/python2.7/dist-packages/webob/request.py", line 1284, in call_application
app_iter = application(self.environ, start_response)
File "/usr/lib/python2.7/dist-packages/paste/urlmap.py", line 206, in __call__
return app(environ, start_response)
File "/usr/lib/python2.7/dist-packages/webob/dec.py", line 144, in __call__
return resp(environ, start_response)
File "/usr/local/lib/python2.7/dist-packages/routes/middleware.py", line 136, in __call__
response = self.app(environ, start_response)
File "/usr/lib/python2.7/dist-packages/webob/dec.py", line 144, in __call__
return resp(environ, start_response)
File "/usr/lib/python2.7/dist-packages/webob/dec.py", line 130, in __call__
resp = self.call_func(req, *args, **self.kwargs)
File "/usr/lib/python2.7/dist-packages/webob/dec.py", line 195, in call_func
return self.func(req, *args, **kwargs)
File "/opt/stack/glance/glance/common/wsgi.py", line 873, in __call__
request, **action_args)
File "/opt/stack/glance/glance/common/wsgi.py", line 897, in dispatch
return method(*args, **kwargs)
File "/opt/stack/glance/glance/common/utils.py", line 508, in wrapped
return func(self, req, *args, **kwargs)
File "/opt/stack/glance/glance/api/v1/images.py", line 868, in create
image_meta = self._reserve(req, image_meta)
File "/opt/stack/glance/glance/api/v1/images.py", line 554, in _reserve
image_meta = registry.add_image_metadata(req.context, image_meta)
File "/opt/stack/glance/glance/registry/client/v1/api.py", line 166, in add_image_metadata
return c.add_image(image_meta)
File "/opt/stack/glance/glance/registry/client/v1/client.py", line 178, in add_image
res = self.do_request("POST", "/images", body=body, headers=headers)
File "/opt/stack/glance/glance/registry/client/v1/client.py", line 137, in do_request
'exc_name': exc_name})
File "/usr/local/lib/python2.7/dist-packages/oslo_utils/excutils.py", line 85, in __exit__
six.reraise(self.type_, self.value, self.tb)
File "/opt/stack/glance/glance/registry/client/v1/client.py", line 122, in do_request
**kwargs)
File "/opt/stack/glance/glance/common/client.py", line 71, in wrapped
return func(self, *args, **kwargs)
File "/opt/stack/glance/glance/common/client.py", line 377, in do_request
headers=copy.deepcopy(headers))
File "/opt/stack/glance/glance/common/client.py", line 88, in wrapped
return func(self, method, url, body, headers)
File "/opt/stack/glance/glance/common/client.py", line 534, in _do_request
raise exception.ServerError()
ServerError: The request returned 500 Internal Server Error.
2015-06-15 23:43:51.933 INFO eventlet.wsgi.server [req-60529339-e52e-
4d2d-8f3b-5f4bcd48d6f5 bc22d530424c45ec9bb823d290f28ff5
a7e24449d3394fefbf029d3ce7a08562] 10.69.4.179 - - [15/Jun/2015
23:43:51] "POST /v1/images HTTP/1.1" 500 139 9.597818
To manage notifications about this bug go to:
https://bugs.launchpad.net/glance/+bug/1465510/+subscriptions
Follow ups
References