Bug 860780 - output from aeolus-restart-services is misleading, reports both success and failure
output from aeolus-restart-services is misleading, reports both success and f...
Product: CloudForms Cloud Engine
Classification: Red Hat
Component: aeolus-configure (Show other bugs)
Unspecified Unspecified
medium Severity low
: beta3
: ---
Assigned To: Steve Linabery
Depends On:
  Show dependency treegraph
Reported: 2012-09-26 13:04 EDT by Giulio Fidente
Modified: 2012-12-04 10:21 EST (History)
6 users (show)

See Also:
Fixed In Version:
Doc Type: Bug Fix
Doc Text:
When 'aeolus-restart-services' attempted to stop an already stopped service, it reported '[FAILED]' even if the exit performed cleanly. This created potentially confusing output, with actions reporting both success and failure. This update changes this behavior and the STDOUT output is now discarded if the exit status is 0. The STDOUT output is still reported where the exit status is something other than 0. The resulting output is now understandable and displays successful restart attempts.
Story Points: ---
Clone Of:
Last Closed: 2012-12-04 10:21:54 EST
Type: Bug
Regression: ---
Mount Type: ---
Documentation: ---
Verified Versions:
Category: ---
oVirt Team: ---
RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: ---

Attachments (Terms of Use)
aeolus-restart-service output (8.25 KB, text/x-log)
2012-09-26 13:04 EDT, Giulio Fidente
no flags Details
log file (1.25 KB, application/octet-stream)
2012-10-02 19:53 EDT, Shveta
no flags Details

External Trackers
Tracker ID Priority Status Summary Last Updated
Red Hat Product Errata RHEA-2012:1516 normal SHIPPED_LIVE CloudForms Cloud Engine 1.1 update 2012-12-04 14:51:45 EST

  None (edit)
Description Giulio Fidente 2012-09-26 13:04:31 EDT
Created attachment 617669 [details]
aeolus-restart-service output

Description of problem:
The output from 'aeolus-restart-services' is misleading; reports both 'success' and 'failed' for the same action (eg. stopping a service already stopped). See log attached, in the start condition all services are stopped.

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

Steps to Reproduce:
1. install and configure the aeolus suite
2. stop some or all the services
3. launch 'aeolus-restart-services'
Actual results:
the output is misleading and also including a ruby stacktrace when unable to conntact postgresql

Expected results:
exit code from all services start/stop scripts should just produce an 'OK' or 'FAILED' state

as per LSB4.1, stopping an already stopped service should be considered a success:

the postgresql init script is the only one which seems to be compliant with that statement
Comment 3 Steve Linabery 2012-09-28 13:47:51 EDT
I'd just like to mention that all the scripts (with the possible exception of the deltacloud-core initscript, but that may be a bug) exit 0, but the output from `service foo stop` is often '[FAILED]' even if the exit is clean.

So my fix for this is to discard the STDOUT output from `service foo {action}` if the exit status from the system process is zero. We still output the STDOUT from `service` if it exits non-zero.
Comment 4 Mike Orazi 2012-10-01 09:56:10 EDT
Commit in master:  04228ee74886bc13dd29e9f00946e7983a5f0646
Commit in 1.1:  d391a97762e1dad656b443be8a2437436c58fa5a
Comment 6 Shveta 2012-10-02 19:53:13 EDT
Created attachment 620564 [details]
log file

Stopped some services and restarted aeolus-services.
As shown in the attached log file .. the O/p of "service foo stop" is not displayed and only sucess is displayed if the service is restarted sucessfully

 rpm -qa|grep aeolus
Comment 7 Shveta 2012-10-02 19:58:08 EDT
However i think colon needs to be removed from Success 

[root@dell-pe1800-01 ~]# aeolus-check-services 

Checking mongod ...

Checking iwhd ...

Checking postgresql ...

Checking httpd ...

Checking deltacloud-core ...

Checking libvirtd ...

Checking aeolus-conductor ...

Checking conductor-delayed_job ...

Checking conductor-dbomatic ...

Checking imagefactory ...

Checking ntpd ...
 FAILURE: ntpd is stopped

Colon should be displayed only if there is a message like in case of Failure.
Comment 9 errata-xmlrpc 2012-12-04 10:21:54 EST
Since the problem described in this bug report should be
resolved in a recent advisory, it has been closed with a
resolution of ERRATA.

For information on the advisory, and where to find the updated
files, follow the link below.

If the solution does not work for you, open a new bug report.


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