Bug 991483 - libra-watchman init script returns exit code 0 even when there's clearly a problem
Summary: libra-watchman init script returns exit code 0 even when there's clearly a pr...
Keywords:
Status: CLOSED CURRENTRELEASE
Alias: None
Product: OpenShift Online
Classification: Red Hat
Component: Containers
Version: 2.x
Hardware: Unspecified
OS: Unspecified
high
high
Target Milestone: ---
: ---
Assignee: Rob Millner
QA Contact: libra bugs
URL:
Whiteboard:
Depends On:
Blocks:
TreeView+ depends on / blocked
 
Reported: 2013-08-02 13:51 UTC by Thomas Wiest
Modified: 2015-05-14 23:25 UTC (History)
3 users (show)

Fixed In Version:
Doc Type: Bug Fix
Doc Text:
Clone Of:
Environment:
Last Closed: 2013-08-07 22:59:01 UTC
Target Upstream Version:
Embargoed:


Attachments (Terms of Use)

Description Thomas Wiest 2013-08-02 13:51:34 UTC
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 19:30:48 UTC
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 21:23:58 UTC
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 07:35:41 UTC
[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.