Bug 862338 - libra-site and libra-broker init scripts don't check their lock file properly for status
Summary: libra-site and libra-broker init scripts don't check their lock file properly...
Keywords:
Status: CLOSED CURRENTRELEASE
Alias: None
Product: OKD
Classification: Red Hat
Component: Website
Version: 2.x
Hardware: Unspecified
OS: Unspecified
medium
low
Target Milestone: ---
: ---
Assignee: Justin Harris
QA Contact: libra bugs
URL:
Whiteboard:
Depends On:
Blocks:
TreeView+ depends on / blocked
 
Reported: 2012-10-02 16:50 UTC by Thomas Wiest
Modified: 2015-05-15 01:14 UTC (History)
4 users (show)

Fixed In Version:
Doc Type: Bug Fix
Doc Text:
Clone Of:
Environment:
Last Closed: 2013-05-11 20:08:44 UTC
Target Upstream Version:
Embargoed:


Attachments (Terms of Use)

Description Thomas Wiest 2012-10-02 16:50:02 UTC
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 19:52:05 UTC
Devenv issue, doesn't block sprint exit.

Comment 2 openshift-github-bot 2013-05-03 18:15:21 UTC
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-08 02:50:09 UTC
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.