Bug 797079 - iscsiadm delete target portal, doesn't remove session
Summary: iscsiadm delete target portal, doesn't remove session
Keywords:
Status: CLOSED NOTABUG
Alias: None
Product: Red Hat Enterprise Linux 6
Classification: Red Hat
Component: iscsi-initiator-utils
Version: 6.3
Hardware: Unspecified
OS: Linux
unspecified
medium
Target Milestone: rc
: ---
Assignee: Chris Leech
QA Contact: Bruno Goncalves
URL:
Whiteboard:
Depends On:
Blocks: 842978 913047
TreeView+ depends on / blocked
 
Reported: 2012-02-24 08:27 UTC by Bruno Goncalves
Modified: 2015-03-27 08:51 UTC (History)
4 users (show)

Fixed In Version:
Doc Type: Bug Fix
Doc Text:
Clone Of:
: 842978 913047 (view as bug list)
Environment:
Last Closed: 2015-03-27 08:51:36 UTC
Target Upstream Version:


Attachments (Terms of Use)

Description Bruno Goncalves 2012-02-24 08:27:37 UTC
Description of problem:
When running iscsiadm -m discovery -p "127.0.0.1" -o delete, the target portal is deleted, but the current sessions are not removed.


Version-Release number of selected component (if applicable):
iscsi-initiator-utils-6.2.0.872-34.el6.x86_64

How reproducible:
100%

Steps to Reproduce:
1. install scsi-target-utils
2. service tgtd restart
3. tgtadm --lld iscsi --op new --mode target --tid 1 -T
iqn.1994-05.com.redhat:tgtd-1
4. tgtadm --lld iscsi --op bind --mode target --tid 1 -I ALL
5. Create disk for LUN: mktemp /tmp/disk.XXXXX
        dd if=/dev/zero of=/tmp/disk.XXXXX bs=1M count=0 seek=100
6. tgtadm --lld iscsi --op new --mode logicalunit --tid 1 --lun 1 -b
/tmp/disk.XXXXX

7.iscsiadm -m discovery -t st -p "127.0.0.1" -I default -P1
8. iscsiadm -m node -l
9. iscsiadm -m discovery -p "127.0.0.1" -o delete
10.iscsiadm -m session
tcp: [124] 127.0.0.1:3260,1 iqn.1994-05.com.redhat:tgtd-1

11. iscsiadm -m session --sid 124
iscsiadm: No records found
12. iscsiadm -m node -p 127.0.0.1 --logout
Logging out of session [sid: 124, target: iqn.1994-05.com.redhat:tgtd-1,
portal: 127.0.0.1,3260]
Logout of [sid: 124, target: iqn.1994-05.com.redhat:tgtd-1, portal:
127.0.0.1,3260] successful.

Actual results:
Target portal deleted, but session exists.

Expected results:
I'd expect an error when trying to delete the portal when there is still sessions like that:
iscsiadm -m node -T iqn.1994-05.com.redhat:tgtd-1 -o delete
iscsiadm: This command will remove the record [iface: default, target: iqn.1994-05.com.redhat:tgtd-1, portal: 127.0.0.1,3260], but a session is using it. Logout session then rerun command to remove record.
iscsiadm: Could not execute operation on all records: session exists


Or the sessions would also be removed.

Comment 1 Mike Christie 2012-03-22 09:43:21 UTC
I am going to move this to 6.4. Not enough time for 6.3.

Comment 3 RHEL Program Management 2012-07-10 08:44:36 UTC
This request was not resolved in time for the current release.
Red Hat invites you to ask your support representative to
propose this request, if still desired, for consideration in
the next release of Red Hat Enterprise Linux.

Comment 4 RHEL Program Management 2012-07-10 23:31:22 UTC
This request was erroneously removed from consideration in Red Hat Enterprise Linux 6.4, which is currently under development.  This request will be evaluated for inclusion in Red Hat Enterprise Linux 6.4.

Comment 7 RHEL Program Management 2013-10-14 05:05:50 UTC
This request was not resolved in time for the current release.
Red Hat invites you to ask your support representative to
propose this request, if still desired, for consideration in
the next release of Red Hat Enterprise Linux.

Comment 8 Bruno Goncalves 2015-03-27 08:51:36 UTC
Closing it as not a bug, it seems to be desirable behavior of iscsiadm.


Note You need to log in before you can comment on or make changes to this bug.