Skip to content

Commit

Permalink
CA-142451: Failed to report all LUNs advertised on targets sharing th…
Browse files Browse the repository at this point in the history
…e same IQN

If a multicontroller array advertises its targets using the same IQN
but different IPs and the LUNs in those targets are distinct,
we are able to show only LUNs coming from the first IP address.

The fix reinstates a line that was removed in commit 391bdf055dff
in our old sm.hg repository.
The purporse of the line is to first check that we have
a valid active iscsi connection using the original pair IP,IQN.
Only if it fails (it should not in my opinion) we fall back to
other ip addresses.

Signed-off-by: Germano Percossi <germano.percossi@citrix.com>
Reviewed-by: Chandrika Srinivasan <chandrika.srinivasan@citrix.com>

GitHub: closes #207 on xapi-project/sm
  • Loading branch information
germanop authored and chandrikas committed Aug 15, 2014
1 parent bce4501 commit 66c89ea
Showing 1 changed file with 10 additions and 9 deletions.
19 changes: 10 additions & 9 deletions drivers/ISCSISR.py
Original file line number Diff line number Diff line change
Expand Up @@ -228,15 +228,16 @@ def _initPaths(self):
util.SMlog("PATHDICT: key %s: %s" % (key,rec))
addrlist.append(key)

# Try to detect an active path in order of priority
for key in self.pathdict:
if self.adapter.has_key(key):
self.tgtidx = key
self.path = self.pathdict[self.tgtidx]['path']
if os.path.exists(self.path):
util.SMlog("Path found: %s" % self.path)
break
self.address = self.tgtidx
if not os.path.exists(self.path):
# Try to detect an active path in order of priority
for key in self.pathdict:
if self.adapter.has_key(key):
self.tgtidx = key
self.path = self.pathdict[self.tgtidx]['path']
if os.path.exists(self.path):
util.SMlog("Path found: %s" % self.path)
break
self.address = self.tgtidx
self._synchroniseAddrList(addrlist)

def _init_adapters(self):
Expand Down

0 comments on commit 66c89ea

Please sign in to comment.