Bug 481002 - /etc/init/network sets result code to 0 even when the service fails
/etc/init/network sets result code to 0 even when the service fails
Status: CLOSED ERRATA
Product: Red Hat Enterprise Linux 5
Classification: Red Hat
Component: initscripts (Show other bugs)
5.4
All Linux
low Severity high
: rc
: ---
Assigned To: initscripts Maintenance Team
BaseOS QE
:
Depends On:
Blocks:
  Show dependency treegraph
 
Reported: 2009-01-21 12:14 EST by Darryl L. Pierce
Modified: 2015-06-21 20:06 EDT (History)
4 users (show)

See Also:
Fixed In Version:
Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of:
Environment:
Last Closed: 2009-09-02 07:14:29 EDT
Type: ---
Regression: ---
Mount Type: ---
Documentation: ---
CRM:
Verified Versions:
Category: ---
oVirt Team: ---
RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: ---


Attachments (Terms of Use)

  None (edit)
Description Darryl L. Pierce 2009-01-21 12:14:29 EST
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 13:21:57 EST
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 14:08:03 EST
(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 15:37:10 EST
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 08:52:17 EDT
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 07:14:29 EDT
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

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