From 99780337316640cb0aaeb44c70601b33076b9d55 Mon Sep 17 00:00:00 2001 From: Rahul Verma Date: Tue, 3 Jun 2014 15:26:48 -0700 Subject: [PATCH] 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 --- cinder/api/middleware/fault.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) 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) -- 2.45.2