From: Jenkins Date: Wed, 2 Oct 2013 21:45:12 +0000 (+0000) Subject: Merge "After commiting quota we should avoid certain reverts" X-Git-Url: https://review.fuel-infra.org/gitweb?a=commitdiff_plain;h=2d1c4f88d4cbe57feda795dec96d5001f53ef6af;p=openstack-build%2Fcinder-build.git Merge "After commiting quota we should avoid certain reverts" --- 2d1c4f88d4cbe57feda795dec96d5001f53ef6af diff --cc cinder/volume/flows/create_volume/__init__.py index 03a7933e1,7883f8c6d..aead0b5cc --- a/cinder/volume/flows/create_volume/__init__.py +++ b/cinder/volume/flows/create_volume/__init__.py @@@ -573,9 -573,13 +573,13 @@@ class EntryCreateTask(base.CinderTask) # We never produced a result and therefore can't destroy anything. if not result: return + if context.quota_committed: + # Committed quota doesn't rollback as the volume has already been + # created at this point, and the quota has already been absorbed. + return vol_id = result['volume_id'] try: - self.db.volume_destroy(context, vol_id) + self.db.volume_destroy(context.elevated(), vol_id) except exception.CinderException: # We are already reverting, therefore we should silence this # exception since a second exception being active will be bad.