Merge "Fix wrong command for _rescan_multipath" into stable/icehouse

This commit is contained in:
Jenkins 2015-02-09 15:36:31 +00:00 committed by Gerrit Code Review
commit 0a6d029deb
2 changed files with 7 additions and 1 deletions

View File

@ -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)

View File

@ -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" %