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
This commit is contained in:
yenai 2018-09-27 11:27:33 +08:00
parent 10ea64db9c
commit 793d36a68d
1 changed files with 3 additions and 3 deletions

View File

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