diff options
author | Chris Behrens <cbehrens@codestud.com> | 2013-06-21 04:31:30 +0000 |
---|---|---|
committer | Chris Behrens <cbehrens@codestud.com> | 2013-06-21 04:33:30 +0000 |
commit | 65a5bf49082dbf0318fd578be584618b80d0fbcf (patch) | |
tree | 373a896752ee8744b7db5f1b68d23f8a8d804d54 /nova/quota.py | |
parent | 022bd8d6c16a1a06a3996f1fa827bc17b4272af7 (diff) | |
download | nova-65a5bf49082dbf0318fd578be584618b80d0fbcf.tar.gz |
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
Diffstat (limited to 'nova/quota.py')
-rw-r--r-- | nova/quota.py | 2 |
1 files changed, 2 insertions, 0 deletions
diff --git a/nova/quota.py b/nova/quota.py index a1c877ecc0..d0241de1c3 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): |