Bug 991483 - libra-watchman init script returns exit code 0 even when there's clearly a problem
libra-watchman init script returns exit code 0 even when there's clearly a pr...
Status: CLOSED CURRENTRELEASE
Product: OpenShift Online
Classification: Red Hat
Component: Containers (Show other bugs)
2.x
Unspecified Unspecified
high Severity high
: ---
: ---
Assigned To: Rob Millner
libra bugs
:
Depends On:
Blocks:
  Show dependency treegraph
 
Reported: 2013-08-02 09:51 EDT by Thomas Wiest
Modified: 2015-05-14 19:25 EDT (History)
3 users (show)

See Also:
Fixed In Version:
Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of:
Environment:
Last Closed: 2013-08-07 18:59:01 EDT
Type: Bug
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 Thomas Wiest 2013-08-02 09:51:34 EDT
Description of problem:
We're seeing this in STG:
# service libra-watchman status
rhc-watchman dead but pid file exists
# echo $?
0
# 

When there is a problem, the init script should NOT exit with a status code of 0. This makes it hard to monitor libra-watchman.


Version-Release number of selected component (if applicable):
rhc-node-1.12.5-1.el6oso.x86_64


How reproducible:
Very, if watchman is down, but the pid file still exists (non normal termination)

Steps to Reproduce:
1. unknown


Actual results:
init script exits with 0

Expected results:
init script should exit with a non zero value
Comment 1 Rob Millner 2013-08-02 15:30:48 EDT
Stage pull request:
https://github.com/openshift/li/pull/1799

Master pull request:
https://github.com/openshift/li/pull/1798


[root@ip-10-35-99-100 ~]# service libra-watchman status
rhc-watchman (pid  14534) is running...
[root@ip-10-35-99-100 ~]# echo $?
0
[root@ip-10-35-99-100 ~]# kill -KILL 14534
[root@ip-10-35-99-100 ~]# service libra-watchman status
rhc-watchman dead but pid file exists
[root@ip-10-35-99-100 ~]# echo $?
1
Comment 2 openshift-github-bot 2013-08-02 17:23:58 EDT
Commit pushed to master at https://github.com/openshift/li

https://github.com/openshift/li/commit/d3af6e2eb2f275278c5fbb856899fd78313aa4d3
Bug 991483 - Set the exit value based on start, stop and status return.
Comment 3 Meng Bo 2013-08-05 03:35:41 EDT
[root@ip-10-164-76-49 ~]# service libra-watchman status
rhc-watchman (pid  1928) is running...
[root@ip-10-164-76-49 ~]# echo $?
0
[root@ip-10-164-76-49 ~]# kill -KILL 1928
[root@ip-10-164-76-49 ~]# service libra-watchman status
rhc-watchman dead but pid file exists
[root@ip-10-164-76-49 ~]# echo $?
1


Issue fixed on devenv-stage_437

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