An internal error happens if passing invalid parameter to "create flavor_extraspecs" API
Affects | Status | Importance | Assigned to | Milestone | |
---|---|---|---|---|---|
OpenStack Compute (nova) |
Fix Released
|
Undecided
|
Ken'ichi Ohmichi |
Bug Description
If passing invalid parameter to "create flavor_extraspecs" API, an internal error happens and Traceback is written in log file.
Nova should return BadRequest response instead of internal error.
$ curl -i 'http://
HTTP/1.1 500 Internal Server Error
Content-Length: 128
Content-Type: application/json; charset=UTF-8
X-Compute-
Date: Thu, 26 Dec 2013 11:06:46 GMT
{"computeFault": {"message": "The server has either erred or is incapable of performing the requested operation.", "code": 500}}
$
** The log of nova-api **
2013-12-26 20:06:46.026 ERROR nova.api.openstack [req-e8b5120c-
2013-12-26 20:06:46.026 TRACE nova.api.openstack Traceback (most recent call last):
2013-12-26 20:06:46.026 TRACE nova.api.openstack File "/opt/stack/
2013-12-26 20:06:46.026 TRACE nova.api.openstack return req.get_
2013-12-26 20:06:46.026 TRACE nova.api.openstack File "/usr/local/
2013-12-26 20:06:46.026 TRACE nova.api.openstack application, catch_exc_
2013-12-26 20:06:46.026 TRACE nova.api.openstack File "/usr/local/
2013-12-26 20:06:46.026 TRACE nova.api.openstack app_iter = application(
2013-12-26 20:06:46.026 TRACE nova.api.openstack File "/usr/local/
2013-12-26 20:06:46.026 TRACE nova.api.openstack return resp(environ, start_response)
2013-12-26 20:06:46.026 TRACE nova.api.openstack File "/opt/stack/
2013-12-26 20:06:46.026 TRACE nova.api.openstack return self.app(env, start_response)
2013-12-26 20:06:46.026 TRACE nova.api.openstack File "/usr/local/
2013-12-26 20:06:46.026 TRACE nova.api.openstack return resp(environ, start_response)
2013-12-26 20:06:46.026 TRACE nova.api.openstack File "/usr/local/
2013-12-26 20:06:46.026 TRACE nova.api.openstack return resp(environ, start_response)
2013-12-26 20:06:46.026 TRACE nova.api.openstack File "/usr/lib/
2013-12-26 20:06:46.026 TRACE nova.api.openstack response = self.app(environ, start_response)
2013-12-26 20:06:46.026 TRACE nova.api.openstack File "/usr/local/
2013-12-26 20:06:46.026 TRACE nova.api.openstack return resp(environ, start_response)
2013-12-26 20:06:46.026 TRACE nova.api.openstack File "/usr/local/
2013-12-26 20:06:46.026 TRACE nova.api.openstack resp = self.call_func(req, *args, **self.kwargs)
2013-12-26 20:06:46.026 TRACE nova.api.openstack File "/usr/local/
2013-12-26 20:06:46.026 TRACE nova.api.openstack return self.func(req, *args, **kwargs)
2013-12-26 20:06:46.026 TRACE nova.api.openstack File "/opt/stack/
2013-12-26 20:06:46.026 TRACE nova.api.openstack content_type, body, accept)
2013-12-26 20:06:46.026 TRACE nova.api.openstack File "/opt/stack/
2013-12-26 20:06:46.026 TRACE nova.api.openstack action_result = self.dispatch(meth, request, action_args)
2013-12-26 20:06:46.026 TRACE nova.api.openstack File "/opt/stack/
2013-12-26 20:06:46.026 TRACE nova.api.openstack return method(req=request, **action_args)
2013-12-26 20:06:46.026 TRACE nova.api.openstack File "/opt/stack/
2013-12-26 20:06:46.026 TRACE nova.api.openstack specs)
2013-12-26 20:06:46.026 TRACE nova.api.openstack File "/opt/stack/
2013-12-26 20:06:46.026 TRACE nova.api.openstack extra_specs)
2013-12-26 20:06:46.026 TRACE nova.api.openstack File "/opt/stack/
2013-12-26 20:06:46.026 TRACE nova.api.openstack return f(*args, **kwargs)
2013-12-26 20:06:46.026 TRACE nova.api.openstack File "/opt/stack/
2013-12-26 20:06:46.026 TRACE nova.api.openstack filter(
2013-12-26 20:06:46.026 TRACE nova.api.openstack AttributeError: 'NoneType' object has no attribute 'keys'
Changed in nova: | |
assignee: | nobody → Ken'ichi Ohmichi (oomichi) |
Changed in nova: | |
status: | New → In Progress |
Changed in nova: | |
milestone: | none → juno-1 |
status: | Fix Committed → Fix Released |
Changed in nova: | |
milestone: | juno-1 → 2014.2 |
Fix proposed to branch: master /review. openstack. org/75721
Review: https:/