]> review.fuel-infra Code Review - openstack-build/cinder-build.git/commit
driver.create/remove_export() require elevated ctx
authorEric Harney <eharney@redhat.com>
Wed, 9 Apr 2014 17:05:54 +0000 (13:05 -0400)
committerjohn-griffith <john.griffith@solidfire.com>
Mon, 14 Apr 2014 19:45:24 +0000 (13:45 -0600)
commit9b46fd6d4d1f96b92003a643dcaacc93ae23c2f1
treeb9364e1618bdbf18341316690427e734ac4c01a4
parent512170afa377752dce02db3b2c0452d27c8ffd48
driver.create/remove_export() require elevated ctx

The volume manager should call driver.create_export()
and driver.remove_export() with an elevated context.

This is already done for remove_export() in some cases
but not in initialize_connection error paths, or for
terminate_connection.

This will at a minimum cause issues with the LVM LIO
driver as its create/remove_export methods uses database
queries requiring admin access (volume_get_iscsi_target_num,
iscsi_target_count_by_host).

Partial-Bug: #1300148
Closes-Bug: #1305197

Change-Id: I5c1091cf9720ebccefc328b64fbf2982b3aac397
(cherry picked from commit d09d12ab2ba72a9e7fe42852a7cf837231053590)
cinder/tests/zonemanager/test_volume_manager_fc.py
cinder/volume/manager.py