Bug 862338 - libra-site and libra-broker init scripts don't check their lock file properly for status
libra-site and libra-broker init scripts don't check their lock file properly...
Status: CLOSED CURRENTRELEASE
Product: OpenShift Origin
Classification: Red Hat
Component: Website (Show other bugs)
2.x
Unspecified Unspecified
medium Severity low
: ---
: ---
Assigned To: Justin Harris
libra bugs
:
Depends On:
Blocks:
  Show dependency treegraph
 
Reported: 2012-10-02 12:50 EDT by Thomas Wiest
Modified: 2015-05-14 21:14 EDT (History)
4 users (show)

See Also:
Fixed In Version:
Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of:
Environment:
Last Closed: 2013-05-11 16:08:44 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 2012-10-02 12:50:02 EDT
Description of problem:
The libra-site and libra-broker init scripts don't properly check their lock files during a status.


For example, when libra-site is stopped, and a status is run, it says this:
[root@ip-10-202-78-111 ~]# /etc/init.d/libra-site stop
Stopping libra-site:                                       [  OK  ]
[root@ip-10-202-78-111 ~]# /etc/init.d/libra-site status
httpd dead but subsys locked
[root@ip-10-202-78-111 ~]#


This is easily fixed by appending '-l ${lockfile}' to the 'status -p ${pidfile}' commands in the script.

NOTE: there are 2 status commands that need to be changed in each init script.

For instance, change this:
status -p ${pidfile} $httpd

to this:
status -p ${pidfile} -l ${lockfile} $httpd


The second one is to change this:
if status -p ${pidfile} $httpd >&/dev/null; then

to this:
if status -p ${pidfile} -l ${lockfile} $httpd >&/dev/null; then


Version-Release number of selected component (if applicable):
rhc-devenv-0.100.7-1.git.0.693a592.el6.noarch

How reproducible:
Very

Steps to Reproduce:
1. Run this:  /etc/init.d/libra-site stop
2. Run this:  /etc/init.d/libra-site status
3. Notice that it says this: httpd dead but subsys locked
  
Actual results:
httpd dead but subsys locked

Expected results:
httpd is stopped
Comment 1 Clayton Coleman 2012-10-02 15:52:05 EDT
Devenv issue, doesn't block sprint exit.
Comment 2 openshift-github-bot 2013-05-03 14:15:21 EDT
Commit pushed to master at https://github.com/openshift/li

https://github.com/openshift/li/commit/ce199487ede4574f5bbffebd0793066ac294e1cd
Status scripts check for lock file.

Bug 862338
Comment 3 Yujie Zhang 2013-05-07 22:50:09 EDT
Tested on devenv_3194, got expected result as following:

[root@ip-10-147-178-59 ~]# /etc/init.d/rhc-site stop
Stopping rhc-site:                                         [  OK  ]
[root@ip-10-147-178-59 ~]# /etc/init.d/rhc-site status
httpd is stopped

So verify this bug, thanks.

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