Bug 534392 (RHQ-1193)

Summary: on server statup not verify only the pid file to be sure that server is on/off...
Product: [Other] RHQ Project Reporter: Rafael Soares (Tuelho) <rsoares>
Component: Launch ScriptsAssignee: RHQ Project Maintainer <rhq-maint>
Status: CLOSED CURRENTRELEASE QA Contact: Sunil Kondkar <skondkar>
Severity: medium Docs Contact:
Priority: medium    
Version: unspecifiedCC: cwelton, jpviragine, rsoares
Target Milestone: ---Keywords: FutureFeature, Improvement
Target Release: ---   
Hardware: All   
OS: All   
URL: http://jira.rhq-project.org/browse/RHQ-1193
Whiteboard:
Fixed In Version: Doc Type: Enhancement
Doc Text:
Story Points: ---
Clone Of: Environment:
OS: Linux Debian JDK. 1.5 Jopr 2.1
Last Closed: 2010-08-25 11:31:26 UTC Type: ---
Regression: --- Mount Type: ---
Documentation: --- CRM:
Verified Versions: Category: ---
oVirt Team: --- RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: --- Target Upstream Version:
Embargoed:

Description Rafael Soares (Tuelho) 2008-11-28 19:50:00 UTC
The function check_status from rhq-server.sh is called by start and verify if the pid file exists and if the pid is running to decide if start or not the server.

...
check_status ()
{
    if [ -f "$PIDFILE" ]; then
        PID=`cat $PIDFILE`
        if [ -n "$PID" ] && kill -0 $PID 2>/dev/null ; then
            STATUS="RHQ Server (pid $PID) is $1"
            RUNNING=1
        else
....

When the rhq-server's platform shutdown or his process is killed the pid file remains intact. When rhq-server is started again this verification may "fails" because the pid coincidently may represent other process and the follow message is returned by script: "RHQ Server (pid xxxx) is running". And then rhq-server will not be started!



Comment 1 Red Hat Bugzilla 2009-11-10 20:27:47 UTC
This bug was previously known as http://jira.rhq-project.org/browse/RHQ-1193


Comment 2 wes hayutin 2010-02-16 17:08:58 UTC
mass add of key word FutureFeature to help track

Comment 3 Corey Welton 2010-08-18 15:08:56 UTC
Per triage this is moved to ONQA w/ the expectation that it is fixed.  If not, please reopen, otherwise close

Comment 4 Sunil Kondkar 2010-08-25 11:31:26 UTC
Tested on jon-2.4.0.GA

Killed the rhq-server process. Verified the server status as 'RHQ Server (pid 25578) is NOT running'. The pid file remains intact showing pid 25578.
When tried to start rhq-server again, it displayed 'RHQ Server (pid 25814) is starting'. rhq server is started successfully.