From 793d36a68d600104f63a3714f31d9623edfbd141 Mon Sep 17 00:00:00 2001 From: yenai Date: Thu, 27 Sep 2018 11:27:33 +0800 Subject: [PATCH] Improve VolumePathsNotFound message details The msg of VolumePathsNotFound exception should contain more info in connection_properties, like 'target_wwns' and 'target_luns'. In this case we provide the summary info 'luns' and 'wwns' instead. Change-Id: Id787809161e2125393bf4fe303b5bc0a8d92c2e4 --- os_brick/initiator/connectors/fibre_channel.py | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/os_brick/initiator/connectors/fibre_channel.py b/os_brick/initiator/connectors/fibre_channel.py index 86cf62a15..b8ee0a191 100644 --- a/os_brick/initiator/connectors/fibre_channel.py +++ b/os_brick/initiator/connectors/fibre_channel.py @@ -102,10 +102,10 @@ class FibreChannelConnector(base.BaseLinuxConnector): for wwn in wwns: targets.append((wwn, luns[0])) else: - # Something is wrong, this shouldn't happen + # Something is wrong, this shouldn't happen. msg = _("Unable to find potential volume paths for FC device " - "with lun: %(lun)s and wwn: %(wwn)s") % { - "lun": target_lun, "wwn": target_wwn} + "with luns: %(luns)s and wwns: %(wwns)s.") % { + "luns": luns, "wwns": wwns} LOG.error(msg) raise exception.VolumePathsNotFound(msg)