diff --git a/nova_powervm/tests/virt/powervm/volume/test_iscsi.py b/nova_powervm/tests/virt/powervm/volume/test_iscsi.py index 37aec3ed..adac7c78 100644 --- a/nova_powervm/tests/virt/powervm/volume/test_iscsi.py +++ b/nova_powervm/tests/virt/powervm/volume/test_iscsi.py @@ -1,4 +1,4 @@ -# Copyright 2015, 2017 IBM Corp. +# Copyright 2015, 2018 IBM Corp. # # All Rights Reserved. # @@ -220,7 +220,7 @@ class TestISCSIAdapter(test_vol.TestVolumeAdapter): vios_uuid='fake_vios', status='fake_status') # Run the method - self.assertRaises(pvm_exc.MultipleExceptionsInFeedTask, + self.assertRaises(p_exc.VolumeAttachFailed, self.vol_drv.connect_volume, self.slot_mgr) @mock.patch('pypowervm.tasks.hdisk.discover_iscsi', autospec=True) @@ -231,8 +231,8 @@ class TestISCSIAdapter(test_vol.TestVolumeAdapter): operation_name='ISCSIDiscovery', error='fake_err') # Run the method - self.assertRaises(pvm_exc.MultipleExceptionsInFeedTask, - self.vol_drv.connect_volume, self.slot_mgr) + self.assertRaises(p_exc.VolumeAttachFailed, + self.multi_vol_drv.connect_volume, self.slot_mgr) @mock.patch('pypowervm.tasks.partition.get_active_vioses', autospec=True) @mock.patch('pypowervm.tasks.storage.rescan_vstor', autospec=True) diff --git a/nova_powervm/virt/powervm/volume/iscsi.py b/nova_powervm/virt/powervm/volume/iscsi.py index 4af073e6..67dfc2f4 100644 --- a/nova_powervm/virt/powervm/volume/iscsi.py +++ b/nova_powervm/virt/powervm/volume/iscsi.py @@ -119,7 +119,10 @@ class IscsiVolumeAdapter(volume.VscsiVolumeAdapter, discovery_password=discovery_password, multipath=self._is_multipath()) except (pvm_exc.ISCSIDiscoveryFailed, pvm_exc.JobRequestFailed) as e: - LOG.warning(e) + msg_args = {'vios': vios_w.uuid, 'err': six.text_type(e)} + LOG.warning("iSCSI discovery on VIOS %(vios)s failed with " + "error: %(err)s", msg_args) + return None, None def _discover_volume_on_vios(self, vios_w): """Discovers an hdisk on a single vios for the volume.