Bug 481002

Summary: /etc/init/network sets result code to 0 even when the service fails
Product: Red Hat Enterprise Linux 5 Reporter: Darryl L. Pierce <dpierce>
Component: initscriptsAssignee: initscripts Maintenance Team <initscripts-maint-list>
Status: CLOSED ERRATA QA Contact: BaseOS QE <qe-baseos-auto>
Severity: high Docs Contact:
Priority: low    
Version: 5.4CC: harald, mvadkert, notting, tross
Target Milestone: rc   
Target Release: ---   
Hardware: All   
OS: Linux   
Whiteboard:
Fixed In Version: Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of: Environment:
Last Closed: 2009-09-02 11:14:29 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:

Description Darryl L. Pierce 2009-01-21 17:14:29 UTC
Details for the request can be found here:
https://bugzilla.redhat.com/show_bug.cgi?id=480677

A fix is being provided on Fedora but is also needed for RHEL5.4 as well.

Description of problem:
When restarting the network service, and the service fails, a result code of 0
is being returned. 

Version-Release number of selected component (if applicable):
initscripts-8.86-1.i386 

How reproducible:

Steps to Reproduce:
1. Disconnect any network cables
2. Restart networking to produce the [FAILED] message
3. Check the result code with "echo $?"

Actual results:
The return code is 0.

Expected results:
The return code should be non-zero.

Additional info:

Comment 1 Bill Nottingham 2009-01-21 18:21:57 UTC
Well, a backport. But I'm leery of changing the semantics of the script without knowing what all the uses of it are by third-party stuff. Do we have an IT for this, or is this just a cluster-manager related fix?

Comment 2 Darryl L. Pierce 2009-01-21 19:08:03 UTC
(In reply to comment #1)
> Well, a backport. But I'm leery of changing the semantics of the script without
> knowing what all the uses of it are by third-party stuff. Do we have an IT for
> this, or is this just a cluster-manager related fix?

I have not opened anything in Issue Tracker, no. 

Our (being oVirt Node) use case regards configuring bridges for networking interfaces and getting back status on whether the interface started successfully or failed. Current it always returns 0. What we would like is:

 * if no [FAIL] messages are reported, return a 0
 * if the network service fails to start, or if any NIC fails to get an address, return a 1

In our case we'll only be worried about one NIC (the management interface) so we'd expect a pass/fail result code.

Comment 3 Darryl L. Pierce 2009-01-21 20:37:10 UTC
If we can just get this patch included in an update:

http://git.fedorahosted.org/git/?p=initscripts.git;a=commitdiff;h=06b375e57c82ca758edcad4c57a598c6329b8a69

that would fix our problems. Sorry for mistating this as needing a backport.

Comment 5 Harald Hoyer 2009-05-05 12:52:17 UTC
Please test the erratum candidate:
http://people.redhat.com/harald/downloads/initscripts/initscripts-8.45.26.1.el5/

Comment 9 errata-xmlrpc 2009-09-02 11:14:29 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-2009-1344.html