# 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.