]> review.fuel-infra Code Review - openstack-build/cinder-build.git/commit
driver.create/remove_export() require elevated context
authorEric Harney <eharney@redhat.com>
Wed, 9 Apr 2014 17:05:54 +0000 (13:05 -0400)
committerEric Harney <eharney@redhat.com>
Thu, 10 Apr 2014 20:08:25 +0000 (16:08 -0400)
commitd09d12ab2ba72a9e7fe42852a7cf837231053590
tree9f45f5c8383f8dfcce7976b809a4ea57f0c6c6ce
parentd196d54e764170d0754e767a5c2ed719ace69644
driver.create/remove_export() require elevated context

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
cinder/tests/zonemanager/test_volume_manager_fc.py
cinder/volume/manager.py