]> review.fuel-infra Code Review - openstack-build/cinder-build.git/commit
Fix race condition in ISCSIConnector disconnect_volume
authorPatrick East <patrick.east@purestorage.com>
Mon, 29 Sep 2014 17:54:22 +0000 (10:54 -0700)
committerPatrick East <patrick.east@purestorage.com>
Mon, 29 Sep 2014 18:04:09 +0000 (11:04 -0700)
commit5d22ec17c7548f3de85ba9e3ad54ce5799dc5fff
treef7bf1d6bc1c1530eea9eeb4e958c105196fda7a9
parentf668b347ca181229fab4b89fda25f1aadfbfdef1
Fix race condition in ISCSIConnector disconnect_volume

The list of devices returned by driver.get_all_block_devices() will
sometimes contain broken symlinks as the SCSI device has been deleted
but the udev rule for the symlink has not yet completed.

Adding in a check to os.path.exists() will ensure that we will not
consider the broken symlinks as an “in use” device.

Change-Id: Ibb869e10976f894f9e18e9edec6739c2c3bea68c
Closes-Bug: #1375382
cinder/brick/initiator/connector.py