iSCSI target administration utility (ietadm) not detecting inactive sessions
Affects | Status | Importance | Assigned to | Milestone | |
---|---|---|---|---|---|
iscsitarget (Ubuntu) |
Fix Released
|
High
|
Unassigned | ||
Precise |
Fix Released
|
High
|
James Page | ||
Quantal |
Fix Released
|
High
|
James Page |
Bug Description
[Impact]
Administrators will not be able to delete targets even when all sessions are inactive.
[Test Case]
(script attached to bug report as well)
sudo apt-get install iscsitarget open-iscsi
echo "ISCSITARGET_
sudo service iscsitarget restart
sudo dd if=/dev/zero of=/fs.iscsi.disk bs=1M count=512
sudo ietadm --op new --tid=1 --params=
sudo ietadm --op new --tid=1 --lun=0 --params=
cat /proc/net/
cat /proc/net/
sudo iscsiadm -m discovery -t st -p 127.0.0.1:3260
sudo iscsiadm -m node -T mytarget -p 127.0.0.1:3260 --login
cat /proc/net/
cat /proc/net/
sudo iscsiadm -m session --logout
sudo ietadm --op delete --tid=1
cat /proc/net/
cat /proc/net/
Failure is indicated by "Device or resource busy." during the delete operation.
[Regression Potential]
The fix is in the event layer of the DKMS module; it ensures that the session removal event gets to the ietd with kernels >= 3.2.
[Original Bug Report]
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-
root@ubuntu-
shows available:
root@ubuntu-
tid:1 name:mytarget
root@ubuntu-
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-
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-
tid:1 name:mytarget
ietadm properly shows active and refuses to delete which is expected:
root@ubuntu-
Device or resource busy.
client logs out:
root@ubuntu-
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-
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-
Device or resource busy.
Changed in iscsitarget (Ubuntu): | |
importance: | Undecided → High |
Changed in iscsitarget (Ubuntu Precise): | |
status: | New → Confirmed |
importance: | Undecided → High |
milestone: | none → precise-updates |
Changed in iscsitarget (Ubuntu Quantal): | |
assignee: | nobody → James Page (james-page) |
Changed in iscsitarget (Ubuntu Precise): | |
assignee: | nobody → James Page (james-page) |
Changed in iscsitarget (Ubuntu Quantal): | |
status: | Confirmed → In Progress |
Changed in iscsitarget (Ubuntu Precise): | |
status: | Confirmed → In Progress |
description: | updated |
tags: |
added: verification-done removed: verification-needed |
Changed in iscsitarget (Ubuntu): | |
assignee: | James Page (james-page) → nobody |
Status changed to 'Confirmed' because the bug affects multiple users.