Bug 865268 - Can not get correct cartridge status via rest api
Can not get correct cartridge status via rest api
Status: CLOSED NOTABUG
Product: OpenShift Origin
Classification: Red Hat
Component: Master (Show other bugs)
2.x
Unspecified Unspecified
medium Severity medium
: ---
: ---
Assigned To: Lili Nader
libra bugs
:
Depends On:
Blocks:
  Show dependency treegraph
 
Reported: 2012-10-11 01:46 EDT by Rony Gong
Modified: 2015-05-14 20:52 EDT (History)
2 users (show)

See Also:
Fixed In Version:
Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of:
Environment:
Last Closed: 2012-10-11 10:26:53 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 Rony Gong 2012-10-11 01:46:24 EDT
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@redhat.com: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 10:26:53 EDT
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.