Good day.
Few days ago I have found strange behavior: LVMoISCSI SR with
multipathing and two target's IPs does not login to second portal
target - only 1st target's IP was processed. This problem was confirmed
in XCP 0.5 and XCP 1.0 (and, I believe is XCP 0.1.1 if someone still
using it).
I dig a little and with help from this maillist found strange code in
ISCSISR.py. Patch to fix this behavior in attachment. (We simply iterate
targetlist instead using a one target portal we succeeded to test
early).
More about configuration where this problem appear:
iscsi (ip1)
+------- HOST1(TARGET1)-----------------+
BLOCK-DEVICE XCP_host(initiator)
+------- HOST2(TARGET2)-----------------+
iscsi (ip2)
in this case we have TWO different portals, announcing same IQN with
same serial and so on.
If we put them both to device-config:target, only first one will be
used, this patch add support for both of them.
sample command to see difference:
xe sr-create type=lvmoiscsi \
device-config:target=10.0.0.1,10.0.0.2 \
device-config:multihomed=true \
device-config:targetIQN=iqn.2011-05.test:test.test \
device-config:SCSIid=1494554000000000031000000000000000000000000000000
name-label=test
PS patch is against XCP 1.0, but shall works fine with XCP 0.5 too.
PPS This problem appear only if we have a DIFFERENT target hosts. Single
target with few available paths will send all it addresses via single
discovery process, so if target is single host, problem will not appear.
--- sm.old/ISCSISR.py 2011-05-19 01:19:36.000000000 +0400
+++ sm/ISCSISR.py 2011-05-19 05:00:19.000000000 +0400
@@ -265,8 +265,15 @@
# Check to see if auto attach was set
if not iscsilib._checkTGT(self.targetIQN):
try:
- map = iscsilib.discovery(self.target, self.port, self.chapuser, \
- self.chappassword, targetIQN=self.targetIQN)
+ map=[]
+ for portal in self.targetlist.split(','):
+ if ':' in portal:
+ target,port=portal.split(':')
+ else:
+ target=portal
+ port=DEFAULT_PORT
+ map.extend(iscsilib.discovery(target, port, self.chapuser, \
+ self.chappassword, targetIQN=self.targetIQN))
iqn = ''
if len(map) == 0:
self._scan_IQNs()
_______________________________________________
xen-api mailing list
[email protected]
http://lists.xensource.com/mailman/listinfo/xen-api