Red Hat Bugzilla – Bug 481002
/etc/init/network sets result code to 0 even when the service fails
Last modified: 2015-06-21 20:06:28 EDT
Details for the request can be found here:
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):
Steps to Reproduce:
1. Disconnect any network cables
2. Restart networking to produce the [FAILED] message
3. Check the result code with "echo $?"
The return code is 0.
The return code should be non-zero.
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?
(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.
If we can just get this patch included in an update:
that would fix our problems. Sorry for mistating this as needing a backport.
Please test the erratum candidate:
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.