You have been subscribed to a public bug by Robbie Williamson (robbiew):

Using up to date Ubuntu precise (3/28/12) with:

iscsitarget - 1.4.20.2-5ubuntu2
iscsitarget-dkms - 1.4.20.2-5ubuntu2

iSCSI target administration utility appears to not detect inactive
sessions correctly.

Replicating bug:

creating a sparse image:

dd if=/dev/zero of=/fs.iscsi.disk bs=1M count=512

then creating target:

root@ubuntu-precise:~# ietadm --op new --tid=1 --params=Name=mytarget
root@ubuntu-precise:~# ietadm --op new --tid=1 --lun=0 
--params=Path=/fs.iscsi.disk 

shows available:

root@ubuntu-precise:~# cat /proc/net/iet/session 
tid:1 name:mytarget

root@ubuntu-precise:~# cat /proc/net/iet/volume 
tid:1 name:mytarget
        lun:0 state:0 iotype:fileio iomode:wt blocks:1048576 blocksize:512 
path:/fs.iscsi.disk

login by client is successful:

root@ubuntu-precise:~# iscsiadm -m node -T mytarget -p 172.16.2.133:3260 --login
Logging in to [iface: default, target: mytarget, portal: 172.16.2.133,3260]
Login to [iface: default, target: mytarget, portal: 172.16.2.133,3260]: 
successful

and shows active session:

root@ubuntu-precise:~# cat /proc/net/iet/session 
tid:1 name:mytarget
        sid:281475014263296 initiator:iqn.1993-08.org.debian:01:2f524641a62d
                cid:0 ip:172.16.2.133 state:active hd:none dd:none

ietadm properly shows active and refuses to delete which is expected:

root@ubuntu-precise:~# ietadm --op delete --tid=1
Device or resource busy.

client logs out:

root@ubuntu-precise:~# iscsiadm -m session --logout
Logging out of session [sid: 2, target: mytarget, portal: 172.16.2.133,3260]
Logout of [sid: 2, target: mytarget, portal: 172.16.2.133,3260]: successful

no longer shows session active:

root@ubuntu-precise:~# cat /proc/net/iet/session 
tid:1 name:mytarget

but ietadm refuses to acknowledge the disconnect and release the target
and a ietadm delete fails saying "in use":

root@ubuntu-precise:~# ietadm --op delete --tid=1
Device or resource busy.

** Affects: iscsitarget (Ubuntu)
     Importance: Undecided
         Status: Confirmed

-- 
iSCSI target administration utility (ietadm) not detecting inactive sessions
https://bugs.launchpad.net/bugs/967984
You received this bug notification because you are a member of Ubuntu Server 
Team, which is subscribed to the bug report.

-- 
Ubuntu-server-bugs mailing list
Ubuntu-server-bugs@lists.ubuntu.com
Modify settings or unsubscribe at: 
https://lists.ubuntu.com/mailman/listinfo/ubuntu-server-bugs

Reply via email to