Bug 852509 - aeolus-check-services always returns 0, no $RETVAL
Summary: aeolus-check-services always returns 0, no $RETVAL
Keywords:
Status: CLOSED ERRATA
Alias: None
Product: CloudForms Cloud Engine
Classification: Retired
Component: aeolus-configure
Version: 1.1.0
Hardware: Unspecified
OS: Unspecified
unspecified
low
Target Milestone: rc
Assignee: Steve Linabery
QA Contact: Rehana
URL:
Whiteboard:
Depends On:
Blocks:
TreeView+ depends on / blocked
 
Reported: 2012-08-28 18:17 UTC by jliberma@redhat.com
Modified: 2012-12-04 15:18 UTC (History)
6 users (show)

Fixed In Version:
Doc Type: Bug Fix
Doc Text:
aeolus-check-services always returned 0, even if a service failed. This fix checks for any failed Cloud Engine service and returns 1 if any service failed.
Clone Of:
Environment:
Last Closed: 2012-12-04 15:18:05 UTC
Embargoed:


Attachments (Terms of Use)


Links
System ID Private Priority Status Summary Last Updated
Red Hat Product Errata RHEA-2012:1516 0 normal SHIPPED_LIVE CloudForms Cloud Engine 1.1 update 2012-12-04 19:51:45 UTC

Description jliberma@redhat.com 2012-08-28 18:17:54 UTC
Description of problem: aeolus-check-services always returns 0 status, even when component services fail. 


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


How reproducible: Always


Steps to Reproduce:
1. Interfere with a service such as httpd to prevent from starting.
2. Run aeolus-check-services
3. echo $?
  
Actual results: returns 0

Expected results: return error status based on RETVAL (like other init scripts)

Additional info: This has consequences in an HA environment where init scripts determine cluster resource availability and fencing.

Comment 2 Steve Linabery 2012-09-06 15:16:50 UTC
040c5eff4d810b2a2a41f255eeea6bc5e0f008fa on master, in nightly build

Comment 5 Ronelle Landy 2012-09-20 19:21:56 UTC
Testing rpms:

>> rpm -qa |grep aeolus
aeolus-configure-2.8.6-1.el6cf.noarch
rubygem-aeolus-image-0.3.0-12.el6.noarch
rubygem-aeolus-cli-0.7.1-1.el6cf.noarch
aeolus-conductor-0.13.8-1.el6cf.noarch
aeolus-conductor-daemons-0.13.8-1.el6cf.noarch
aeolus-conductor-doc-0.13.8-1.el6cf.noarch
aeolus-all-0.13.8-1.el6cf.noarch

 - Modified /etc/sysconfig/deltacloud-core and stopped the service
 - Ran aeolus-check-services
 - echo $? returns 1
 - Test results are included below:

.................

[root@qeblade39 sysconfig]# aeolus-check-services

Checking mongod ...
 Success: mongod (pid 26739) is running...

Checking iwhd ...
 Success: iwhd (pid  26763) is running...

Checking postgresql ...
 Success: postmaster (pid  26802) is running...

Checking httpd ...
 Success: httpd (pid  26823) is running...

Checking deltacloud-core ...
 FAILURE: deltacloud-core is stopped

Checking libvirtd ...
 Success: libvirtd (pid  26875) is running...

Checking aeolus-conductor ...
 Success: thin (pid  26960) is running...

Checking conductor-delayed_job ...
 Success: delayed_job.0 (pid  27008) is running...
delayed_job.1 (pid  27010) is running...

Checking conductor-dbomatic ...
 Success: dbomatic (pid  27026) is running...

Checking imagefactory ...
 Success: imagefactory (pid  27043) is running...

Checking ntpd ...
 Success: ntpd (pid  27060) is running...
[root@qeblade39 sysconfig]# echo $?
1

.... Restarting services

 
[root@qeblade39 sysconfig]# aeolus-restart-services

# service ntpd stop ...
 Success: Shutting down ntpd: [  OK  ]

# service imagefactory stop ...
 Success: Stopping imagefactory: [  OK  ]

# service conductor-dbomatic stop ...
[  OK  ]: Shutting down conductor-dbomatic: [  OK  ]

# service conductor-delayed_job stop ...
/usr/share/aeolus-conductor/config/../app/util/deployable_xml.rb:210: warning: already initialized constant DEPLOYABLE_VERSION
 Success: Shutting down conductor-delayed_job: Using gem require instead of bundler
delayed_job: trying to stop process with pid 27010...
delayed_job: trying to stop process with pid 27008...
delayed_job: process with pid 27008 successfully stopped.
delayed_job: process with pid 27010 successfully stopped.
[  OK  ]

# service aeolus-conductor stop ...
 Success: Shutting down thin: [  OK  ]

# service libvirtd stop ...
 Success: Stopping libvirtd daemon: [  OK  ]

# service deltacloud-core stop ...
 FAILURE: Shutting down deltacloud-core: [FAILED]

# service httpd stop ...
 Success: Stopping httpd: [  OK  ]

# service postgresql stop ...
 Success: Stopping postgresql service: [  OK  ]

# service iwhd stop ...
[  OK  ]: Stopping iwhd daemon:  [  OK  ]

# service mongod stop ...
 Success: Stopping mongod: [  OK  ]

# service mongod start ...
 Success: Starting mongod: [  OK  ]

# service iwhd start ...
 Success: waiting for mongod to listen on localhost:27017[  OK  ]
Starting iwhd daemon: [  OK  ]

# service postgresql start ...
 Success: Starting postgresql service: [  OK  ]

# service httpd start ...
 Success: Starting httpd: [  OK  ]

# service deltacloud-core start ...
 Success: Starting deltacloud-core-mock: [  OK  ]

# service libvirtd start ...
 Success: Starting libvirtd daemon: [  OK  ]

# service aeolus-conductor start ...
 Success: Starting thin: [  OK  ]

# service conductor-delayed_job start ...
/usr/share/aeolus-conductor/config/../app/util/deployable_xml.rb:210: warning: already initialized constant DEPLOYABLE_VERSION
 Success: Starting conductor-delayed_job: Using gem require instead of bundler
delayed_job.0: process with pid 27745 started.
delayed_job.1: process with pid 27747 started.
[  OK  ]

# service conductor-dbomatic start ...
[  OK  ]: Starting conductor-dbomatic: [  OK  ]

# service imagefactory start ...
 Success: Starting imagefactory: [  OK  ]

# service ntpd start ...
 Success: Starting ntpd: [  OK  ]

# service mongod status ...
 Success: mongod (pid 27476) is running...

[root@qeblade39 sysconfig]# echo $?
0

Comment 7 errata-xmlrpc 2012-12-04 15:18:05 UTC
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.

http://rhn.redhat.com/errata/RHEA-2012-1516.html


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