Hide Forgot
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.
I am going to move this to 6.4. Not enough time for 6.3.
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.
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.
Closing it as not a bug, it seems to be desirable behavior of iscsiadm.