Bug 969390

Summary: Should give a correct prompt when rhc port-forward for stopped db cartridge
Product: OpenShift Online Reporter: Wei Sun <wsun>
Component: ocAssignee: Clayton Coleman <ccoleman>
Status: CLOSED CURRENTRELEASE QA Contact: libra bugs <libra-bugs>
Severity: low Docs Contact:
Priority: low    
Version: 2.x   
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-06-24 14:50:10 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 Wei Sun 2013-05-31 11:00:36 UTC
Description of problem:
Create a scaling app with db cartridge,and stop db cartridge,and then run `rhc port-forward` for stopped db cartrdige,but prompt that "app is stopped". Should 
prompt "db cartrdige is stopped"

Version-Release number of selected component (if applicable):
rhc 1.9.6
devenv-stage_354

How reproducible:
Always

Steps to Reproduce:
1.Create a scaling app with db cartridge
2.Stop db cartrdige
3.Get db cartridge gear id
4.Run `rhc port-forward $app --gear $dbgearid`

Actual results:
3.[sunwei@dhcp-8-229 ~]$ rhc app-show phps --gears
ID                       State   Cartridges          Size  SSH URL
------------------------ ------- ------------------- ----- ---------------------------------------------------------------------------
51a86baabd71ca283f000020 started php-5.3 haproxy-1.4 small 51a86baabd71ca283f000020.rhcloud.com
51a86d5ebd71ca365a000003 started php-5.3 haproxy-1.4 small 51a86d5ebd71ca365a000003.rhcloud.com
51a87950bd71ca283f000041 started php-5.3 haproxy-1.4 small 51a87950bd71ca283f000041.rhcloud.com
51a8708bbd71ca5bfa000027 stopped mysql-5.1           small 51a8708bbd71ca5bfa000027.rhcloud.com

4.[sunwei@dhcp-8-229 phps]$ rhc port-forward -a phps --gear 51a8708bbd71ca5bfa000027
Checking available ports ... Application phps is stopped. Please restart the application and try again.


Expected results:
Prompt db cartridge is stopped

Additional info:

Comment 1 Clayton Coleman 2013-06-14 23:05:21 UTC
Fixed in https://github.com/openshift/rhc/pull/403

Comment 2 Wei Sun 2013-06-17 05:01:49 UTC
Will verify it after the pull request is merged.

Comment 3 openshift-github-bot 2013-06-17 15:10:10 UTC
Commit pushed to master at https://github.com/openshift/rhc

https://github.com/openshift/rhc/commit/5735b63c47b13c17eb6f91e97dc6d4e9bbeac0b9
Bug 969390 - Only full stop triggers message

Comment 4 Wei Sun 2013-06-18 01:09:03 UTC
Verified on devenv_3372

Result:
[sunwei@dhcp-8-229 dev]$ rhc port-forward phps --gear 51bfaf4c3f0025071700001c -p x
Checking available ports ... none
There are no available ports to forward for this application. Your application may be stopped or idled.