[Bug 967984] [NEW] iSCSI target administration utility (ietadm) not detecting inactive sessions

John Strunk 967984 at bugs.launchpad.net
Thu Mar 29 04:51:29 UTC 2012


Public bug reported:

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 at ubuntu-precise:~# ietadm --op new --tid=1 --params=Name=mytarget
root at ubuntu-precise:~# ietadm --op new --tid=1 --lun=0 --params=Path=/fs.iscsi.disk 

shows available:

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

root at 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 at 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 at 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 at ubuntu-precise:~# ietadm --op delete --tid=1
Device or resource busy.

client logs out:

root at 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 at 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 at ubuntu-precise:~# ietadm --op delete --tid=1
Device or resource busy.

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

-- 
You received this bug notification because you are a member of Ubuntu
Foundations Bugs, which is subscribed to iscsitarget in Ubuntu.
https://bugs.launchpad.net/bugs/967984

Title:
  iSCSI target administration utility (ietadm) not detecting inactive
  sessions

Status in “iscsitarget” package in Ubuntu:
  New

Bug description:
  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 at ubuntu-precise:~# ietadm --op new --tid=1 --params=Name=mytarget
  root at ubuntu-precise:~# ietadm --op new --tid=1 --lun=0 --params=Path=/fs.iscsi.disk 

  shows available:

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

  root at 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 at 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 at 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 at ubuntu-precise:~# ietadm --op delete --tid=1
  Device or resource busy.

  client logs out:

  root at 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 at 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 at ubuntu-precise:~# ietadm --op delete --tid=1
  Device or resource busy.

To manage notifications about this bug go to:
https://bugs.launchpad.net/ubuntu/+source/iscsitarget/+bug/967984/+subscriptions




More information about the foundations-bugs mailing list