Return WWN in multipath_id
When we refactored the iSCSI connect mechanism we inadvertently changed the value returned for the "multipath_id" key. This patch fixes this and return the WWN as the value again. This value is used by the encryption mechanism and expects it to be the WWN. Related-Bug: #1703954 Change-Id: Ia6d96a1e3a71488b44b3ca2323610a8f0a7cf675
This commit is contained in:
parent
f341e9c3ed
commit
66520dcf6c
|
@ -542,7 +542,7 @@ class ISCSIConnector(base.BaseLinuxConnector, base_iscsi.BaseISCSIConnector):
|
||||||
|
|
||||||
result = {'type': 'block', 'scsi_wwn': wwn, 'path': device}
|
result = {'type': 'block', 'scsi_wwn': wwn, 'path': device}
|
||||||
if mpath:
|
if mpath:
|
||||||
result['multipath_id'] = mpath
|
result['multipath_id'] = wwn
|
||||||
return result
|
return result
|
||||||
|
|
||||||
@utils.retry(exceptions=(exception.VolumeDeviceNotFound))
|
@utils.retry(exceptions=(exception.VolumeDeviceNotFound))
|
||||||
|
|
|
@ -1107,7 +1107,7 @@ Setting up iSCSI targets: unused
|
||||||
|
|
||||||
res = self.connector._connect_multipath_volume(self.CON_PROPS)
|
res = self.connector._connect_multipath_volume(self.CON_PROPS)
|
||||||
|
|
||||||
expected = {'type': 'block', 'scsi_wwn': 'wwn', 'multipath_id': 'dm-0',
|
expected = {'type': 'block', 'scsi_wwn': 'wwn', 'multipath_id': 'wwn',
|
||||||
'path': '/dev/dm-0'}
|
'path': '/dev/dm-0'}
|
||||||
self.assertEqual(expected, res)
|
self.assertEqual(expected, res)
|
||||||
|
|
||||||
|
@ -1176,7 +1176,7 @@ Setting up iSCSI targets: unused
|
||||||
|
|
||||||
res = self.connector._connect_multipath_volume(self.CON_PROPS)
|
res = self.connector._connect_multipath_volume(self.CON_PROPS)
|
||||||
|
|
||||||
expected = {'type': 'block', 'scsi_wwn': 'wwn', 'multipath_id': 'dm-0',
|
expected = {'type': 'block', 'scsi_wwn': 'wwn', 'multipath_id': 'wwn',
|
||||||
'path': '/dev/dm-0'}
|
'path': '/dev/dm-0'}
|
||||||
self.assertEqual(expected, res)
|
self.assertEqual(expected, res)
|
||||||
self.assertEqual(1, get_wwn_mock.call_count)
|
self.assertEqual(1, get_wwn_mock.call_count)
|
||||||
|
@ -1386,7 +1386,7 @@ Setting up iSCSI targets: unused
|
||||||
res = self.connector._get_connect_result(props, 'wwn', ['sda', 'sdb'],
|
res = self.connector._get_connect_result(props, 'wwn', ['sda', 'sdb'],
|
||||||
'mpath')
|
'mpath')
|
||||||
expected = {'type': 'block', 'scsi_wwn': 'wwn', 'path': '/dev/mpath',
|
expected = {'type': 'block', 'scsi_wwn': 'wwn', 'path': '/dev/mpath',
|
||||||
'multipath_id': 'mpath'}
|
'multipath_id': 'wwn'}
|
||||||
self.assertDictEqual(expected, res)
|
self.assertDictEqual(expected, res)
|
||||||
get_link_mock.assert_not_called()
|
get_link_mock.assert_not_called()
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue