From: Rahul Verma Date: Tue, 3 Jun 2014 22:26:48 +0000 (-0700) Subject: Remove Quota Exception Stack Traces from Cinder Logs X-Git-Url: https://review.fuel-infra.org/gitweb?a=commitdiff_plain;h=99780337316640cb0aaeb44c70601b33076b9d55;p=openstack-build%2Fcinder-build.git Remove Quota Exception Stack Traces from Cinder Logs Added an if clause to the Cinder API FaultWrapper so that a warning is printed rather than an error and stack trace if an exception of type QuotaError is thrown. Closes-Bug: 1324294 Change-Id: If91db0f443afc212af3893e27dd36f19b15c43bf --- diff --git a/cinder/api/middleware/fault.py b/cinder/api/middleware/fault.py index 020b76906..dd1566d42 100644 --- a/cinder/api/middleware/fault.py +++ b/cinder/api/middleware/fault.py @@ -41,8 +41,8 @@ class FaultWrapper(base_wsgi.Middleware): status, webob.exc.HTTPInternalServerError)() def _error(self, inner, req): - LOG.exception(_("Caught error: %s"), unicode(inner)) - + if not isinstance(inner, exception.QuotaError): + LOG.exception(_("Caught error: %s"), unicode(inner)) safe = getattr(inner, 'safe', False) headers = getattr(inner, 'headers', None) status = getattr(inner, 'code', 500)