diff --git a/os_brick/initiator/connectors/fibre_channel_s390x.py b/os_brick/initiator/connectors/fibre_channel_s390x.py index 64d48ca60..4d39b1b07 100644 --- a/os_brick/initiator/connectors/fibre_channel_s390x.py +++ b/os_brick/initiator/connectors/fibre_channel_s390x.py @@ -71,14 +71,19 @@ class FibreChannelConnectorS390X(fibre_channel.FibreChannelConnector): def _get_device_file_path(self, pci_num, target_wwn, lun): # NOTE(arne_r) - # Need to add two possible ways to resolve device paths, + # Need to add multiple possible ways to resolve device paths, # depending on OS. Since it gets passed to '_get_possible_volume_paths' # having a mismatch is not a problem host_device = [ + # RHEL based "/dev/disk/by-path/ccw-%s-zfcp-%s:%s" % ( pci_num, target_wwn, self._get_lun_string(lun)), + # Debian based (e.g. for storwize) "/dev/disk/by-path/ccw-%s-fc-%s-lun-%s" % ( pci_num, target_wwn, lun), + # Debian based (e.g. for ds8k) + "/dev/disk/by-path/ccw-%s-fc-%s-lun-%s" % ( + pci_num, target_wwn, self._get_lun_string(lun)), ] return host_device diff --git a/os_brick/tests/initiator/connectors/test_fibre_channel_s390x.py b/os_brick/tests/initiator/connectors/test_fibre_channel_s390x.py index e687a2ef7..0f3f16eac 100644 --- a/os_brick/tests/initiator/connectors/test_fibre_channel_s390x.py +++ b/os_brick/tests/initiator/connectors/test_fibre_channel_s390x.py @@ -37,11 +37,13 @@ class FibreChannelConnectorS390XTestCase(test_connector.ConnectorTestCase): devices = self.connector._get_host_devices(possible_devs, lun) mock_configure_scsi_device.assert_called_with(3, 5, "0x0002000000000000") - self.assertEqual(2, len(devices)) + self.assertEqual(3, len(devices)) device_path = "/dev/disk/by-path/ccw-3-zfcp-5:0x0002000000000000" self.assertEqual(devices[0], device_path) device_path = "/dev/disk/by-path/ccw-3-fc-5-lun-2" self.assertEqual(devices[1], device_path) + device_path = "/dev/disk/by-path/ccw-3-fc-5-lun-0x0002000000000000" + self.assertEqual(devices[2], device_path) def test_get_lun_string(self): lun = 1