iSCSI: log exception if portals not found

If an exception occurs in _get_ips_iqns_luns(), a
TargetPortalsNotFound exception is raised, but nothing is logged. It
would be useful for debugging to know what led to the exception.

Change-Id: I2ed7f9641acc9d8d506c368a44d789950a4f25dd
Closes-Bug: 1814512
This commit is contained in:
Avishay Traeger 2019-02-04 11:21:38 +02:00
parent 14be08d0b5
commit f3ad8c08fe
1 changed files with 1 additions and 0 deletions

View File

@ -195,6 +195,7 @@ class ISCSIConnector(base.BaseLinuxConnector, base_iscsi.BaseISCSIConnector):
except exception.TargetPortalsNotFound:
raise
except Exception:
LOG.exception('Exception encountered during portal discovery')
if 'target_portals' in connection_properties:
raise exception.TargetPortalsNotFound(
target_portals=connection_properties['target_portals'])