Bug 986235

Summary: iscsiadm is returning different error code when trying to remove a session that does not exist.
Product: Red Hat Enterprise Linux 7 Reporter: Bruno Goncalves <bgoncalv>
Component: iscsi-initiator-utilsAssignee: Chris Leech <cleech>
Status: CLOSED NOTABUG QA Contact: Martin Hoyer <mhoyer>
Severity: medium Docs Contact:
Priority: medium    
Version: 7.0CC: lmiksik, raunak.kumar
Target Milestone: rcKeywords: Triaged
Target Release: ---   
Hardware: Unspecified   
OS: Unspecified   
Whiteboard:
Fixed In Version: Doc Type: If docs needed, set a value
Doc Text:
Story Points: ---
Clone Of:
: 1482102 (view as bug list) Environment:
Last Closed: 2018-11-09 13:12:20 UTC Type: Bug
Regression: --- Mount Type: ---
Documentation: --- CRM:
Verified Versions: Category: ---
oVirt Team: --- RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: --- Target Upstream Version:
Embargoed:
Bug Depends On:    
Bug Blocks: 1482102    

Description Bruno Goncalves 2013-07-19 09:46:03 UTC
Description of problem:
When trying to delete a session that does not exist the newer version of iscsi-initiator-utils return different value.

---------

iscsi-initiator-utils-6.2.0.873-2.el7.x86_64

iscsiadm -m session -o new -r 0
iscsiadm: could not read session targetname: 5
iscsiadm: Could not get session info for sid 0

echo $?
22
---------
iscsi-initiator-utils-6.2.0.873-7.el7.x86_64

iscsiadm -m session -o new -r 0
iscsiadm: 0 is an invalid session ID or path

echo $?
1

Version-Release number of selected component (if applicable):
iscsi-initiator-utils-6.2.0.873-7.el7.x86_64

How reproducible:
100%


Is this a bug or the new error code is the expected one?

Comment 2 Ludek Smid 2014-06-26 10:47:15 UTC
This request was resolved in Red Hat Enterprise Linux 7.0.

Contact your manager or support representative in case you have further questions about the request.

Comment 3 Ludek Smid 2014-06-26 11:15:32 UTC
The comment above is incorrect. The correct version is bellow.
I'm sorry for any inconvenience.
---------------------------------------------------------------

This request was NOT resolved in Red Hat Enterprise Linux 7.0.

Contact your manager or support representative in case you need
to escalate this bug.

Comment 4 Bruno Goncalves 2014-10-08 13:19:05 UTC
It is still reproducible on RHEL-7.0

iscsi-initiator-utils-6.2.0.873-21.

Comment 5 Bruno Goncalves 2014-10-30 15:07:18 UTC
Reproducible with iscsi-initiator-utils-6.2.0.873-22.el7

Comment 7 Martin Hoyer 2016-08-02 11:36:48 UTC
Still reproducible with iscsi-initiator-utils-6.2.0.873-34.el7

Comment 8 Martin Hoyer 2018-11-09 13:12:20 UTC
This is a bug in our test. We were using invalid ISID 0.
Works well with >= 1

# iscsiadm -m session -o new -r 1
iscsiadm: could not read session targetname: 5
iscsiadm: Could not get session info for sid 1
# echo $?
22