Bug 996713

Summary: Consider printing each cartridge's status for 'app show --state'
Product: OpenShift Online Reporter: Hiro Asari <hasari>
Component: ocAssignee: Clayton Coleman <ccoleman>
Status: CLOSED NOTABUG QA Contact: libra bugs <libra-bugs>
Severity: unspecified Docs Contact:
Priority: unspecified    
Version: 2.xCC: jhonce, jkeck
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: 2013-08-16 18:25:02 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 Hiro Asari 2013-08-13 19:01:18 UTC
Description of problem:
As pointed out in https://bugzilla.redhat.com/show_bug.cgi?id=996609, 'rhc app show --state' simply passes on what the broker says as the state, which could be disconnected from the realities of individual cartridges belonging to the application. This disconnect can happen if the primary cartridge dies unexpectedly.

It may be beneficial to report each cartridge's status in addition to, or instead of, the broker's response.

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

How reproducible:
always

Steps to Reproduce:
1. rhc app create foo2 nodejs-0.6 postgresql-9.2 --from-code \ https://github.com/cjryan/nodejs-bughunting.git
2. rhc cartridge stop postgresql-9.2 -a foo2
3. rhc cartridge restart nodejs-0.6 -a foo2
4. curl http://foo2-*/postgresql
5. curl http://foo2-*/
6. rhc app show foo2 --state; rhc cartridge status nodejs-0.6 -a foo2

Actual results:
Cartridge nodejs-0.6, postgresql-9.2 is started
RESULT:
Application is running

Expected results:
Cartridge nodejs-0.6 is stopped
Cartridge postgresql-9.2 is stopped
RESULT:
Application is not running


Additional info: