Bug 845162

Summary: MySQL status hook does not correctly show true status
Product: OKD Reporter: Rajat Chopra <rchopra>
Component: ContainersAssignee: Ram Ranganathan <ramr>
Status: CLOSED CURRENTRELEASE QA Contact: libra bugs <libra-bugs>
Severity: medium Docs Contact:
Priority: medium    
Version: 2.xCC: mfisher, qgong, ramr
Target Milestone: ---   
Target Release: ---   
Hardware: Unspecified   
OS: Unspecified   
Whiteboard:
Fixed In Version: Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of: Environment:
Last Closed: 2012-08-07 20:42:59 UTC Type: Bug
Regression: --- Mount Type: ---
Documentation: --- CRM:
Verified Versions: Category: ---
oVirt Team: --- RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: --- Target Upstream Version:
Embargoed:

Description Rajat Chopra 2012-08-02 03:49:50 UTC
Description of problem:
Mysql status is wrong

Version-Release number of selected component (if applicable):


How reproducible:
Always

Steps to Reproduce:
1. Create an app with mysql embedded
2. Kill the mysql process by ssh-ing into the gear
3. check status from cli tools
  
Actual results:
mysql is running

Expected results:
mysql should appear as stopped or inaccessible


Additional info:

In status function of the mysql_ctl file :
The pid file is executed directly instead reading its contents
And the runcon set for finding out if mysql_safe is running is insufficient for pgrep (should use user's uid as well)

Comment 1 Ram Ranganathan 2012-08-02 04:43:00 UTC
Fixed with git commit 9183866fe72a1cd839b9a95cbe5dd3610c057d30. Waiting to push this out.

Comment 2 Ram Ranganathan 2012-08-02 17:39:23 UTC
Issued a pull request : https://github.com/openshift/crankcase/pull/324 for this fix -- awaiting bot build results.

Comment 3 Rajat Chopra 2012-08-02 20:35:45 UTC
Pull request for stage hotfix : https://github.com/openshift/crankcase/pull/327

Comment 4 Rony Gong 🔥 2012-08-03 04:33:20 UTC
Verified for mongodb and mysql on stg_228.
[root@localhost mytest]# rhc app cartridge status  -a qs1jbossas -c mongodb-2.0
Password: 


RESULT:
MongoDB is stopped