]> review.fuel-infra Code Review - openstack-build/cinder-build.git/commit
Elevate context for delete volume with no host.
authorJohn Griffith <john.griffith@solidfire.com>
Thu, 28 Feb 2013 19:01:39 +0000 (19:01 +0000)
committerJohn Griffith <john.griffith@solidfire.com>
Thu, 28 Feb 2013 19:06:38 +0000 (19:06 +0000)
commita2830e5417539980249e3ab12d8bf9538d8956c4
treec01c15ebf22d300651e340a344825201a813bbb9
parentdd010690330e8304eadddab158ba5c2e3f57d8c8
Elevate context for delete volume with no host.

So in the case of a volume that is placed in error state
on create and never actually deployed, the cinder.volume.api delete
call does a short cut call to db.destroy_volume which is fine because
all we have is a DB entry (scheduler never deployed the volume).

Unfortunately, this requires admin context, so just add an elevate
context to the db.destroy_volume call.

Fixes bug: 1084273

Change-Id: I0ef8bf4356047c385bef703b8dce7d5edf537bf6
cinder/volume/api.py