From 62e6c7268dcdf2479a7c8864acc32493df22b7e8 Mon Sep 17 00:00:00 2001 From: Abhijeet Malawade Date: Fri, 27 Sep 2013 05:38:59 -0700 Subject: [PATCH] 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 --- cinder/volume/flows/create_volume/__init__.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) 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. -- 2.45.2