Skip to content

Commit

Permalink
CA-398425: correctly check for multiple targets in iSCSI
Browse files Browse the repository at this point in the history
Signed-off-by: Mark Syms <[email protected]>
  • Loading branch information
MarkSymsCtx committed Aug 30, 2024
1 parent ab45ca5 commit 521c44a
Showing 1 changed file with 3 additions and 2 deletions.
5 changes: 3 additions & 2 deletions drivers/LVHDoISCSISR.py
Original file line number Diff line number Diff line change
Expand Up @@ -103,7 +103,8 @@ def create_iscsi_sessions(self, sr_uuid):
self.iscsiSRs = []
self.iscsiSRs.append(iscsi)
saved_exc = None
if self.dconf['target'].find(',') == 0 or self.dconf['targetIQN'] == "*":
targets = self.dconf['target'].split(',')
if len(targets) > 1 or self.dconf['targetIQN'] == "*":
# Instantiate multiple sessions
self.iscsiSRs = []
if self.dconf['targetIQN'] == "*":
Expand All @@ -129,7 +130,7 @@ def create_iscsi_sessions(self, sr_uuid):
# IQNstring cannot be built with a dictionary iteration because of this
IQNstring = self.dconf['multiSession']
else:
for tgt in self.dconf['target'].split(','):
for tgt in targets:
try:
tgt_ip = util._convertDNS(tgt)
except:
Expand Down

0 comments on commit 521c44a

Please sign in to comment.