From 65a5bf49082dbf0318fd578be584618b80d0fbcf Mon Sep 17 00:00:00 2001 From: Chris Behrens Date: Fri, 21 Jun 2013 04:31:30 +0000 Subject: Fix quota logging on exceptions When exceptions committing or rolling back quota reservations occurs, we log the failure. However, the code also falls through to log a succesful commit/rollback. This adds the missing returns. Change-Id: Ieccb4071c64dde740ec95a783533a8a3a1850481 --- nova/quota.py | 2 ++ 1 file changed, 2 insertions(+) diff --git a/nova/quota.py b/nova/quota.py index a1c877ecc..d0241de1c 100644 --- a/nova/quota.py +++ b/nova/quota.py @@ -993,6 +993,7 @@ class QuotaEngine(object): # logged, however, because this is less than optimal. LOG.exception(_("Failed to commit reservations " "%(reservations)s") % locals()) + return LOG.debug(_("Committed reservations %(reservations)s") % locals()) def rollback(self, context, reservations, project_id=None): @@ -1015,6 +1016,7 @@ class QuotaEngine(object): # logged, however, because this is less than optimal. LOG.exception(_("Failed to roll back reservations " "%(reservations)s") % locals()) + return LOG.debug(_("Rolled back reservations %(reservations)s") % locals()) def usage_reset(self, context, resources): -- cgit