In a successful run of tempest, we have negative tests for invalid volume sizes. When we set that we get a stack trace from cinderclient as follows:
<2013-03-19 18:35:45.729 TRACE nova.api.openstack>
Traceback (most recent call last): File "/opt/stack/new/nova/nova/api/openstack/__init__.py", line 81, in __call__
return req.get_response(self.application)
File "/usr/local/lib/python2.7/dist-packages/webob/request.py", line 1296, in send
application, catch_exc_info=False)
File "/usr/local/lib/python2.7/dist-packages/webob/request.py", line 1260, in call_application
app_iter = application(self.environ, start_response)
File "/usr/local/lib/python2.7/dist-packages/webob/dec.py", line 144, in __call__
return resp(environ, start_response)
File "/opt/stack/new/python-keystoneclient/keystoneclient/middleware/auth_token.py", line 450, in __call__
return self.app(env, start_response)
File "/usr/local/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/webob/dec.py", line 144, in __call__
return resp(environ, start_response)
File "/usr/lib/python2.7/dist-packages/routes/middleware.py", line 131, in __call__
response = self.app(environ, start_response)
File "/usr/local/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/webob/dec.py", line 130, in __call__
resp = self.call_func(req, *args, **self.kwargs)
File "/usr/local/lib/python2.7/dist-packages/webob/dec.py", line 195, in call_func
return self.func(req, *args, **kwargs)
File "/opt/stack/new/nova/nova/api/openstack/wsgi.py", line 890, in __call__
content_type, body, accept)
File "/opt/stack/new/nova/nova/api/openstack/wsgi.py", line 942, in _process_stack
action_result = self.dispatch(meth, request, action_args)
File "/opt/stack/new/nova/nova/api/openstack/wsgi.py", line 1022, in dispatch
return method(req=request, **action_args)
File "/opt/stack/new/nova/nova/api/openstack/compute/contrib/volumes.py", line 254, in create
availability_zone=availability_zone
File "/opt/stack/new/nova/nova/volume/cinder.py", line 268, in create
item = cinderclient(context).volumes.create(size, **kwargs)
File "/opt/stack/new/python-cinderclient/cinderclient/v1/volumes.py", line 171, in create
return self._create('/volumes', body, 'volume')
File "/opt/stack/new/python-cinderclient/cinderclient/base.py", line 149, in _create
resp, body = self.api.client.post(url, body=body)
File "/opt/stack/new/python-cinderclient/cinderclient/client.py", line 188, in post
return self._cs_request(url, 'POST', **kwargs)
File "/opt/stack/new/python-cinderclient/cinderclient/client.py", line 153, in _cs_request
**kwargs)
File "/opt/stack/new/python-cinderclient/cinderclient/client.py", line 136, in request
raise exceptions.from_response(resp, body)
BadRequest: Invalid input received: Volume size '0' must be an integer and greater than 0 (HTTP 400) (Request-ID: req-ba526415-c315-4151-a869-ee68a9019289)
We should catch this exception low enough that we don't stack trace on it.
Fix proposed to branch: master /review. openstack. org/25072
Review: https:/