From: Abhijeet Malawade Date: Fri, 27 Sep 2013 12:38:59 +0000 (-0700) Subject: Create volume revert fails for non admin user X-Git-Url: https://review.fuel-infra.org/gitweb?a=commitdiff_plain;h=62e6c7268dcdf2479a7c8864acc32493df22b7e8;p=openstack-build%2Fcinder-build.git Create volume revert fails for non admin user Done fixes in revert method of EntryCreateTask task to use elevated context while destroying volume. Fixes bug #1230159 Change-Id: I41b7f2ae4e0235df40bcdaa511256775228751aa --- diff --git a/cinder/volume/flows/create_volume/__init__.py b/cinder/volume/flows/create_volume/__init__.py index de2192c48..79267cf14 100644 --- a/cinder/volume/flows/create_volume/__init__.py +++ b/cinder/volume/flows/create_volume/__init__.py @@ -575,7 +575,7 @@ class EntryCreateTask(base.CinderTask): 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.