[stgt] Strange sendtargets behaviour
Chris Webb
chris at arachsys.com
Mon Aug 24 22:56:24 CEST 2009
I'm seeing an odd behaviour from sendtargets discovery from open-iscsi to
tgt. We're running open-iscsi 2.0-871 against a remote linux tgt 0.9.7.
discovery.sendtargets.iscsi.MaxRecvDataSegmentLength is set to 262144 to
avoid the target list being prematurely truncated.
When I run
iscsiadm -m discovery -t sendtargets
against the remote target, sometimes it is returning warning messages and
aborting halfway through the target list:
# iscsiadm -m discovery -t sendtargets -p 0a2bc790-aab9-45bd-ad58-6fd7d9b2aae7.storage.elastichosts.com | wc -l
iscsiadm: Cannot resolve host 172.16.226.12. getaddrinfo error: [Servname not supported for ai_socktype]
iscsiadm: cannot resolve 172.16.226.12
iscsiadm: failed to add default portal, ignoring target
iqn.2008-03.com.elastichosts:ad0b32d2-c220-4be5-a609-5ea063f0a4cc:daaa6df9-0d5d-4d31-b5d7-e3799c9efd4f
iscsiadm: failed to add target record
iscsiadm: This command will remove the record [iface: default, target:
iqn.2008-03.com.elastichosts:ad0b32d2-c220-4be5-a609-5ea063f0a4cc:32367157-899b-4e75-ad4f-2c23d828a92a, portal:
172.16.226.12,3260], but a session is using it. Logout session then rerun command to remove record.
iscsiadm: This command will remove the record [iface: default, target:
iqn.2008-03.com.elastichosts:ad0b32d2-c220-4be5-a609-5ea063f0a4cc:d79f2d28-8bd0-43d3-b44f-41e863afddda, portal:
172.16.226.12,3260], but a session is using it. Logout session then rerun command to remove record.
55
whereas sometimes it works fine:
# iscsiadm -m discovery -t sendtargets -p 0a2bc790-aab9-45bd-ad58-6fd7d9b2aae7.storage.elastichosts.com | wc -l
113
Which of these it does appears to vary from second to second: I can get a
couple of failures then a few successes then some failures again, which is very
strange! After a while, I started to get completely invalid data:
iscsiadm: unexpected SendTargets data: a
iscsiadm: unexpected SendTargets data:
iscsiadm: unexpected SendTargets data:
iscsiadm: unexpected SendTargets data:
iscsiadm: unexpected SendTargets data:o}�
[...]
Once it gets into this state, it doesn't start working again!
Killing and restarting tgtd, then rexporting all the targets fixes the
problem for five or ten discoveries, but then after a while the problem
recurs. I don't see this from another tgtd which is only exporting 89
targets.
Best wishes,
Chris.
--
To unsubscribe from this list: send the line "unsubscribe stgt" in
the body of a message to majordomo at vger.kernel.org
More majordomo info at http://vger.kernel.org/majordomo-info.html
More information about the stgt
mailing list