Skip to content

Commit 2fd6d12

Browse files
committed
CA-142451: Fail to report all LUNs advertised on targets sharing the 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 <[email protected]>
1 parent bce4501 commit 2fd6d12

File tree

1 file changed

+10
-9
lines changed

1 file changed

+10
-9
lines changed

drivers/ISCSISR.py

Lines changed: 10 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -228,15 +228,16 @@ def _initPaths(self):
228228
util.SMlog("PATHDICT: key %s: %s" % (key,rec))
229229
addrlist.append(key)
230230

231-
# Try to detect an active path in order of priority
232-
for key in self.pathdict:
233-
if self.adapter.has_key(key):
234-
self.tgtidx = key
235-
self.path = self.pathdict[self.tgtidx]['path']
236-
if os.path.exists(self.path):
237-
util.SMlog("Path found: %s" % self.path)
238-
break
239-
self.address = self.tgtidx
231+
if not os.path.exists(self.path):
232+
# Try to detect an active path in order of priority
233+
for key in self.pathdict:
234+
if self.adapter.has_key(key):
235+
self.tgtidx = key
236+
self.path = self.pathdict[self.tgtidx]['path']
237+
if os.path.exists(self.path):
238+
util.SMlog("Path found: %s" % self.path)
239+
break
240+
self.address = self.tgtidx
240241
self._synchroniseAddrList(addrlist)
241242

242243
def _init_adapters(self):

0 commit comments

Comments
 (0)