Hello,
I'm seeing an error reported by iscsiadm when attempting to run
concurrent login/logout operations on the same server. I'm using
version 2.0-871 on Ubuntu 10.04 (64-bit).
In my setup, I'm running two instances of the same test script which
makes various iscsiadm calls. Each test script has it's own unique
set of initiator IQN, target IQN, and interface names. (all of the
targets are hosted on the same IET instance, so the portal IPs are all
the same).
The script does the following:
iscsiadm --mode iface --interface <iface> --op=new
iscsiadm --mode iface --interface <iface> --op=update --
name=iface.initiatorname --value=<init_iqn>
iscsiadm --mode discovery --type sendtargets --portal <ip> --
interface <iface>
iscsiadm --mode node --portal <ip> --targetname <iqn> --interface
<iface> --login
// format partitions
// mount
// install files
// umount
iscsiadm --mode node --interface <iface> --logout
iscsiadm --mode iface --interface <iface> --op=delete
In the error scenario, I have two instances running; lets call them T1
and T2.
- T1 has just issued it's 'iscsiadm --login'
- T2 issues 'iscsiadm ... --logout', which is reported to succeed
- T2 then attempts to delete it's interface, but fails (error text
below).
- T1 login call finishes successfully, and the test goes off to
twiddle bits on the LUNs
- T2 attempts cleanup, which is to simply re-issue the identical
iscsiadm logout/delete calls; both succeed.
Here's the output when the interface delete failed:
Executing: iscsiadm --mode node --interface iface_6037_iqn.
1996-04.de.suse:01:b25a95fc46d --logout
Logging out of session [sid: 18, target: iqn.
2009-02.com.rackwareinc:18233-31862-13174-18081-30072, portal:
192.168.111.5,3260]
Logout of [sid: 18, target: iqn.2009-02.com.rackwareinc:
18233-31862-13174-18081-30072, portal: 192.168.111.5,3260]: successful
Executing: iscsiadm --mode iface --interface iface_6037_iqn.
1996-04.de.suse:01:b25a95fc46d --op=delete
iscsiadm: could not read session targetname: 5
iscsiadm: could not find session info for session21
iscsiadm: This command will remove the record [iface:
iface_6037_iqn.1996-04.de.suse:01:b25a95fc46d, target: iqn.
2009-02.com.rackwareinc:18233-31862-13174-18081-30072, portal:
192.168.111.5,3260], but a session is using it. Logout session then
rerun command to remove record.
iscsiadm: Could not delete iface iface_6037_iqn.1996-04.de.suse:
01:b25a95fc46d. A session is is using it or it could not be found.
After T1's login finishes, T2's cleanup code re-issues the same
commands which succeed:
Executing: iscsiadm --mode node --interface iface_6037_iqn.
1996-04.de.suse:01:b25a95fc46d --logout
Executing: iscsiadm --mode iface --interface iface_6037_iqn.
1996-04.de.suse:01:b25a95fc46d --op=delete
iface_6037_iqn.1996-04.de.suse:01:b25a95fc46d unbound and deleted.
Right now my plan is to work around this by adding a lock to my higher
level code, to ensure that iscsiadm commands are not run
concurrently. Any other advice would be appreciated.
Thanks,
-Jason
--
You received this message because you are subscribed to the Google Groups
"open-iscsi" group.
To post to this group, send email to [email protected].
To unsubscribe from this group, send email to
[email protected].
For more options, visit this group at
http://groups.google.com/group/open-iscsi?hl=en.