Merge "Fix iSCSI multipath cleanup"
This commit is contained in:
commit
5dfa56d8f4
|
@ -136,11 +136,11 @@ class LinuxSCSI(executor.Executor):
|
|||
LOG.debug("remove multipath device %s", device)
|
||||
mpath_dev = self.find_multipath_device(device)
|
||||
if mpath_dev:
|
||||
self.flush_multipath_device(mpath_dev['id'])
|
||||
devices = mpath_dev['devices']
|
||||
LOG.debug("multipath LUNs to remove %s", devices)
|
||||
for device in devices:
|
||||
self.remove_scsi_device(device['device'])
|
||||
self.flush_multipath_device(mpath_dev['id'])
|
||||
|
||||
def flush_device_io(self, device):
|
||||
"""This is used to flush any remaining IO in the buffers."""
|
||||
|
|
|
@ -168,11 +168,11 @@ class LinuxSCSITestCase(base.TestCase):
|
|||
|
||||
self.linuxscsi.remove_multipath_device('/dev/dm-3')
|
||||
expected_commands = [
|
||||
('multipath -f 350002ac20398383d'),
|
||||
('blockdev --flushbufs /dev/sde'),
|
||||
('tee -a /sys/block/sde/device/delete'),
|
||||
('blockdev --flushbufs /dev/sdf'),
|
||||
('tee -a /sys/block/sdf/device/delete'),
|
||||
('multipath -f 350002ac20398383d'), ]
|
||||
('tee -a /sys/block/sdf/device/delete'), ]
|
||||
self.assertEqual(expected_commands, self.cmds)
|
||||
|
||||
def test_find_multipath_device_3par_ufn(self):
|
||||
|
|
Loading…
Reference in New Issue