← Back to team overview

yahoo-eng-team team mailing list archive

[Bug 1098048] Re: Traceback from cinderclient in nova-api log for BadRequest errors

 

** Changed in: nova/grizzly
       Status: Fix Committed => Fix Released

-- 
You received this bug notification because you are a member of Yahoo!
Engineering Team, which is subscribed to OpenStack Compute (nova).
https://bugs.launchpad.net/bugs/1098048

Title:
  Traceback from cinderclient in nova-api log for BadRequest errors

Status in OpenStack Compute (Nova):
  Fix Released
Status in OpenStack Compute (nova) grizzly series:
  Fix Released

Bug description:
  This is not about Nova API behaving badly. This is merely to point out
  that tracebacks are printed into nova-api.log when cinderclient raises
  an exception.

  For example, here is a section of nova-api log corresponding to the
  (correct) behavior of a Tempest negative test case against Volumes:

  2013-01-10 03:02:04.843 ERROR nova.api.openstack [req-ac772de2-6048-4007-9ccc-ce6c52e1deca VolumesNegativeTestJSON-user VolumesNegativeTestJSON-tenant] Caught error: Invalid input received: Volume size '#$%' must be an integer and greater than 0 (HTTP 400) (Request-ID: req-b497ba96-3406-4c83-81ac-43809d82589c)
  2013-01-10 03:02:04.843 12151 TRACE nova.api.openstack Traceback (most recent call last):
  2013-01-10 03:02:04.843 12151 TRACE nova.api.openstack   File "/opt/stack/new/nova/nova/api/openstack/__init__.py", line 81, in __call__
  2013-01-10 03:02:04.843 12151 TRACE nova.api.openstack     return req.get_response(self.application)
  2013-01-10 03:02:04.843 12151 TRACE nova.api.openstack   File "/usr/local/lib/python2.7/dist-packages/webob/request.py", line 1053, in get_response
  2013-01-10 03:02:04.843 12151 TRACE nova.api.openstack     application, catch_exc_info=False)
  2013-01-10 03:02:04.843 12151 TRACE nova.api.openstack   File "/usr/local/lib/python2.7/dist-packages/webob/request.py", line 1022, in call_application
  2013-01-10 03:02:04.843 12151 TRACE nova.api.openstack     app_iter = application(self.environ, start_response)
  2013-01-10 03:02:04.843 12151 TRACE nova.api.openstack   File "/usr/local/lib/python2.7/dist-packages/webob/dec.py", line 159, in __call__
  2013-01-10 03:02:04.843 12151 TRACE nova.api.openstack     return resp(environ, start_response)
  2013-01-10 03:02:04.843 12151 TRACE nova.api.openstack   File "/opt/stack/new/python-keystoneclient/keystoneclient/middleware/auth_token.py", line 329, in __call__
  2013-01-10 03:02:04.843 12151 TRACE nova.api.openstack     return self.app(env, start_response)
  2013-01-10 03:02:04.843 12151 TRACE nova.api.openstack   File "/usr/local/lib/python2.7/dist-packages/webob/dec.py", line 159, in __call__
  2013-01-10 03:02:04.843 12151 TRACE nova.api.openstack     return resp(environ, start_response)
  2013-01-10 03:02:04.843 12151 TRACE nova.api.openstack   File "/usr/local/lib/python2.7/dist-packages/webob/dec.py", line 159, in __call__
  2013-01-10 03:02:04.843 12151 TRACE nova.api.openstack     return resp(environ, start_response)
  2013-01-10 03:02:04.843 12151 TRACE nova.api.openstack   File "/usr/lib/python2.7/dist-packages/routes/middleware.py", line 131, in __call__
  2013-01-10 03:02:04.843 12151 TRACE nova.api.openstack     response = self.app(environ, start_response)
  2013-01-10 03:02:04.843 12151 TRACE nova.api.openstack   File "/usr/local/lib/python2.7/dist-packages/webob/dec.py", line 159, in __call__
  2013-01-10 03:02:04.843 12151 TRACE nova.api.openstack     return resp(environ, start_response)
  2013-01-10 03:02:04.843 12151 TRACE nova.api.openstack   File "/usr/local/lib/python2.7/dist-packages/webob/dec.py", line 147, in __call__
  2013-01-10 03:02:04.843 12151 TRACE nova.api.openstack     resp = self.call_func(req, *args, **self.kwargs)
  2013-01-10 03:02:04.843 12151 TRACE nova.api.openstack   File "/usr/local/lib/python2.7/dist-packages/webob/dec.py", line 208, in call_func
  2013-01-10 03:02:04.843 12151 TRACE nova.api.openstack     return self.func(req, *args, **kwargs)
  2013-01-10 03:02:04.843 12151 TRACE nova.api.openstack   File "/opt/stack/new/nova/nova/api/openstack/wsgi.py", line 895, in __call__
  2013-01-10 03:02:04.843 12151 TRACE nova.api.openstack     content_type, body, accept)
  2013-01-10 03:02:04.843 12151 TRACE nova.api.openstack   File "/opt/stack/new/nova/nova/api/openstack/wsgi.py", line 951, in _process_stack
  2013-01-10 03:02:04.843 12151 TRACE nova.api.openstack     action_result = self.dispatch(meth, request, action_args)
  2013-01-10 03:02:04.843 12151 TRACE nova.api.openstack   File "/opt/stack/new/nova/nova/api/openstack/wsgi.py", line 1040, in dispatch
  2013-01-10 03:02:04.843 12151 TRACE nova.api.openstack     return method(req=request, **action_args)
  2013-01-10 03:02:04.843 12151 TRACE nova.api.openstack   File "/opt/stack/new/nova/nova/api/openstack/compute/contrib/volumes.py", line 252, in create
  2013-01-10 03:02:04.843 12151 TRACE nova.api.openstack     availability_zone=availability_zone
  2013-01-10 03:02:04.843 12151 TRACE nova.api.openstack   File "/opt/stack/new/nova/nova/volume/cinder.py", line 242, in create
  2013-01-10 03:02:04.843 12151 TRACE nova.api.openstack     item = cinderclient(context).volumes.create(size, **kwargs)
  2013-01-10 03:02:04.843 12151 TRACE nova.api.openstack   File "/opt/stack/new/python-cinderclient/cinderclient/v1/volumes.py", line 155, in create
  2013-01-10 03:02:04.843 12151 TRACE nova.api.openstack     return self._create('/volumes', body, 'volume')
  2013-01-10 03:02:04.843 12151 TRACE nova.api.openstack   File "/opt/stack/new/python-cinderclient/cinderclient/base.py", line 149, in _create
  2013-01-10 03:02:04.843 12151 TRACE nova.api.openstack     resp, body = self.api.client.post(url, body=body)
  2013-01-10 03:02:04.843 12151 TRACE nova.api.openstack   File "/opt/stack/new/python-cinderclient/cinderclient/client.py", line 192, in post
  2013-01-10 03:02:04.843 12151 TRACE nova.api.openstack     return self._cs_request(url, 'POST', **kwargs)
  2013-01-10 03:02:04.843 12151 TRACE nova.api.openstack   File "/opt/stack/new/python-cinderclient/cinderclient/client.py", line 157, in _cs_request
  2013-01-10 03:02:04.843 12151 TRACE nova.api.openstack     **kwargs)
  2013-01-10 03:02:04.843 12151 TRACE nova.api.openstack   File "/opt/stack/new/python-cinderclient/cinderclient/client.py", line 140, in request
  2013-01-10 03:02:04.843 12151 TRACE nova.api.openstack     raise exceptions.from_response(resp, body)
  2013-01-10 03:02:04.843 12151 TRACE nova.api.openstack BadRequest: Invalid input received: Volume size '#$%' must be an integer and greater than 0 (HTTP 400) (Request-ID: req-b497ba96-3406-4c83-81ac-43809d82589c)
  2013-01-10 03:02:04.843 12151 TRACE nova.api.openstack 
  2013-01-10 03:02:04.917 INFO nova.api.openstack [req-ac772de2-6048-4007-9ccc-ce6c52e1deca VolumesNegativeTestJSON-user VolumesNegativeTestJSON-tenant] http://127.0.0.1:8774/v2/bb9e881613e0486492630ef01979237a/os-volumes returned with HTTP 400

  I believe the solution here is to just not log the traceback, instead,
  only logging the last couple lines above...

To manage notifications about this bug go to:
https://bugs.launchpad.net/nova/+bug/1098048/+subscriptions