Bug 865268 - Can not get correct cartridge status via rest api
Summary: Can not get correct cartridge status via rest api
Keywords:
Status: CLOSED NOTABUG
Alias: None
Product: OKD
Classification: Red Hat
Component: Master
Version: 2.x
Hardware: Unspecified
OS: Unspecified
medium
medium
Target Milestone: ---
: ---
Assignee: Lili Nader
QA Contact: libra bugs
URL:
Whiteboard:
Depends On:
Blocks:
TreeView+ depends on / blocked
 
Reported: 2012-10-11 05:46 UTC by Rony Gong 🔥
Modified: 2015-05-15 00:52 UTC (History)
2 users (show)

Fixed In Version:
Doc Type: Bug Fix
Doc Text:
Clone Of:
Environment:
Last Closed: 2012-10-11 14:26:53 UTC
Target Upstream Version:
Embargoed:


Attachments (Terms of Use)

Description Rony Gong 🔥 2012-10-11 05:46:24 UTC
Description of problem:
It shows idle in file  db_gear_uuid/app-root/runtime/.state,  but  rhc cartridge status -a qsjbosseap -c postgresql  shows it's running 
This errror happened for all cartridge like haproxy-1.4,mongodb and mysql

And from rhc app show qsjbosseap --state , show  postgresq is idle 
OpenShiftmatoMacBook-Pro:rhc root# rhc app show qsjbosseap --state 
Password: 
RESULT:
Geargroup jbosseap-6.0 is started
Geargroup jbosseap-6.0+haproxy-1.4 is started
Geargroup postgresql-8.4 is idle

Version-Release number of selected component (if applicable):
devenv_2311
client(build from fork_ami_US2597_US2599_US2813_US2817_US2872_US2816_US2814_226)

How reproducible:
always

Steps to Reproduce:
1.Create scalable app and embed db(postgresql)
2.idle the db by ssh instance with root: rhc-idler -u gear_uuid
3.rhc cartridge status -a qsjbosseap -c postgresql
  
Actual results:
curl -k -H "Accept: application/json" --user "qgong:123456"  https://ec2-50-19-57-158.compute-1.amazonaws.com/broker/rest/domains/qgong6/applications/qsjbosseap/cartridges/postgresql-8.4?include=status_messages| python -mjson.tool
        "status_messages": [
            {
                "gear_id": "37aacc5613a04dc292d56712a3f9aadb", 
                "message": "PostgreSQL server instance is running\n"
            }
        ], 

OpenShiftmatoMacBook-Pro:rhc root# rhc cartridge status -a qsjbosseap -c postgresql
Password: 
RESULT:
PostgreSQL server instance is running

but ssh instance and, cat /var/lib/openshift/db_gear_uuid/app-root/runtime/.stat, it is idle

Expected results:
RESULT:
PostgreSQL server instance is idle

Additional info:

Comment 1 Clayton Coleman 2012-10-11 14:26:53 UTC
Cartridge status is not the same thing as idle gear.  "Status" means a message from the service on the cart.  Idle is a gear state, which means "Shut down elements of this item".

So a gear can be idle at the same time postgresql is running.


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