Bug 588990

Summary: iscsiadm can exit with status 19 (ENODEV) even when exec_iface_up() succeeds
Product: Red Hat Enterprise Linux 5 Reporter: Charles Duffy <charles_duffy>
Component: iscsi-initiator-utilsAssignee: Mike Christie <mchristi>
Status: CLOSED ERRATA QA Contact: Red Hat Kernel QE team <kernel-qe>
Severity: medium Docs Contact:
Priority: low    
Version: 5.4CC: bdonahue, coughlan, mchristi
Target Milestone: rc   
Target Release: ---   
Hardware: All   
OS: Linux   
Whiteboard:
Fixed In Version: Doc Type: Bug Fix
Doc Text:
Previously, the open-iscsi administration utility (iscsiadm) interface update operation returned an error code, even though the operation was successful. This error has been fixed, the error detection code has been corrected, and the interface update now behaves as expected.
Story Points: ---
Clone Of:
: 589256 (view as bug list) Environment:
Last Closed: 2011-01-13 22:58:32 UTC Type: ---
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: 589256    

Description Charles Duffy 2010-05-05 03:22:53 UTC
Description of problem:

  Line 1447 in open-iscsi-2.0-871-test4.bnx2i/usr/iscsiadm.c explicitly treats ENODEV as an non-anomalous situation, and allows passthrough to line 1450 (logging success) in this case.

  However, the rc value which is tested is also used by return value, which is also used as the exit status. Consequently, this successful operation can be treated by calling scripts as a failure.

Version-Release number of selected component (if applicable):

  iscsi-initiator-utils 6.2.0.871

How reproducible:

  100%

Steps to Reproduce:

 1. Run the following command:

     iscsiadm \
       -m iface \
       -I test-scsi-if-0 \
       --op=update \
       -n iface.net_ifacename \
       -v eth1
     echo "Exit status: $?"

    ...updated to use a different interface name if necessary
  
Actual results:

  test-scsi-if-0 updated.
  19

Expected results:

  test-scsi-if-0 updated.
  0

Comment 2 RHEL Program Management 2010-08-09 19:10:59 UTC
This request was evaluated by Red Hat Product Management for
inclusion in the current release of Red Hat Enterprise Linux.
Because the affected component is not scheduled to be updated in the
current release, Red Hat is unfortunately unable to address this
request at this time. Red Hat invites you to ask your support
representative to propose this request, if appropriate and relevant,
in the next release of Red Hat Enterprise Linux.

Comment 3 Mike Christie 2010-09-25 05:06:46 UTC
This is fixed in 
iscsi-initiator-utils-6.2.0.872-0.el5.
It can be downloaded here:
http://people.redhat.com/mchristi/iscsi/rhel5.6/iscsi-initiator-utils/

Comment 5 Barry Donahue 2010-10-20 19:19:21 UTC
Verified on RHEL5.6-Server-20101014.0

Comment 6 Jaromir Hradilek 2010-12-08 10:56:40 UTC
    Technical note added. If any revisions are required, please edit the "Technical Notes" field
    accordingly. All revisions will be proofread by the Engineering Content Services team.
    
    New Contents:
Previously, the open-iscsi administration utility (iscsiadm) interface update operation returned an error code, even though the operation was successful. This error has been fixed, the error detection code has been corrected, and the interface update now behaves as expected.

Comment 8 errata-xmlrpc 2011-01-13 22:58:32 UTC
An advisory has been issued which should help the problem
described in this bug report. This report is therefore being
closed with a resolution of ERRATA. For more information
on therefore solution and/or where to find the updated files,
please follow the link below. You may reopen this bug report
if the solution does not work for you.

http://rhn.redhat.com/errata/RHBA-2011-0072.html