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
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
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.
[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