Merge "Fix wrong command for _rescan_multipath" into stable/icehouse
This commit is contained in:
commit
0a6d029deb
|
@ -240,6 +240,12 @@ class LibvirtVolumeTestCase(test.NoDBTestCase):
|
|||
}
|
||||
}
|
||||
|
||||
def test_rescan_multipath(self):
|
||||
libvirt_driver = volume.LibvirtISCSIVolumeDriver(self.fake_conn)
|
||||
libvirt_driver._rescan_multipath()
|
||||
expected_multipath_cmd = ('multipath', '-r')
|
||||
self.assertIn(expected_multipath_cmd, self.executes)
|
||||
|
||||
def test_libvirt_iscsi_driver(self):
|
||||
# NOTE(vish) exists is to make driver assume connecting worked
|
||||
self.stubs.Set(os.path, 'exists', lambda x: True)
|
||||
|
|
|
@ -634,7 +634,7 @@ class LibvirtISCSIVolumeDriver(LibvirtBaseVolumeDriver):
|
|||
check_exit_code=[0, 1, 21, 255])
|
||||
|
||||
def _rescan_multipath(self):
|
||||
self._run_multipath('-r', check_exit_code=[0, 1, 21])
|
||||
self._run_multipath(['-r'], check_exit_code=[0, 1, 21])
|
||||
|
||||
def _get_host_device(self, iscsi_properties):
|
||||
return ("/dev/disk/by-path/ip-%s-iscsi-%s-lun-%s" %
|
||||
|
|
Loading…
Reference in New Issue