Bug 903164

Summary: rhc app tidy/status/restart/show/force-stop/stop/start/reload cannot work well when executing them in a app dir
Product: OKD Reporter: chunchen <chunchen>
Component: ocAssignee: Clayton Coleman <ccoleman>
Status: CLOSED CURRENTRELEASE QA Contact: libra bugs <libra-bugs>
Severity: medium Docs Contact:
Priority: low    
Version: 2.xCC: dmcphers, hasari, wsun
Target Milestone: ---Keywords: Regression
Target Release: ---   
Hardware: Unspecified   
OS: Unspecified   
Whiteboard:
Fixed In Version: Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of: Environment:
Last Closed: 2013-02-14 00:46:20 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 chunchen 2013-01-23 11:00:04 UTC
Description of problem:
rhc app tidy/status/restart/show/force-stop/stop/start/reload cannot work well when executing them in a app dir


Version-Release number of selected component (if applicable):
devenv_2709
rhc-1.3.5
rhc-1.3.6


How reproducible:
always


Steps to Reproduce:
1.Create a app
  rhc app create perl00 perl-5.10
2.Come into the app dir
  cd perl00
3.tidy/status/restart/show/force-stop/stop/start/reload the app 
  rhc app tidy/status/restart/show/force-stop/stop/start/reload perl00
 
 
Actual results:
Too many arguments passed in: perl00
Usage: rhc app show <app> [--namespace namespace]
Pass '--help' to see the full list of options


Expected results:
This commands should work well.


Additional info:
1: If add the '-a' option,they can work well, commands like:
  rhc app tidy/status/restart/show/force-stop/stop/start/reload -a perl00
2: if out of any app dir, this comands will work well.
3: this commands can work well on version rhc-1.3.4

Comment 1 Hiro Asari 2013-01-23 19:01:41 UTC
Compare:

$ bx ../bin/rhc -d app status perl00
Warning: This command is deprecated. Please use 'rhc app show --state' instead. For porting and testing purposes you may switch this a warning to an error by setting the DISABLE_DEPRECATED environment
variable to 1.  It is not recommended to do so in a production environment as this option will be removed in a future release.

DEBUG: Connecting to https://107.21.82.126/broker/rest/api
DEBUG: Getting all domains
DEBUG: SSL Verification failed -- Using self signed cert
Password: 
DEBUG: SSL Verification failed -- Using self signed cert
DEBUG: Getting app context
DEBUG: Running git config --get rhc.app-name
DEBUG: UUID = 'perl00'
Too many arguments passed in: perl00
Usage: rhc app status <app> [--namespace namespace] [--app app]
Pass '--help' to see the full list of options

and

$ bx bin/rhc -d app status perl00
Warning: This command is deprecated. Please use 'rhc app show --state' instead. For porting and testing purposes you may switch this a warning to an error by setting the DISABLE_DEPRECATED environment
variable to 1.  It is not recommended to do so in a production environment as this option will be removed in a future release.

DEBUG: Connecting to https://107.21.82.126/broker/rest/api
DEBUG: Getting all domains
DEBUG: SSL Verification failed -- Using self signed cert
Password: 
DEBUG: SSL Verification failed -- Using self signed cert
DEBUG: Getting app context
DEBUG: Running git config --get rhc.app-name
DEBUG: UUID = ''
DEBUG: Running git config --get rhc.app-uuid
DEBUG: UUID = ''
DEBUG: Getting all domains
DEBUG: Finding domain foofoofoofoo
DEBUG: Getting all domains
DEBUG: Finding application :name => perl00, :framework => 
DEBUG: Getting all applications for domain foofoofoofoo

RESULT:
DEBUG: Getting all gear groups for application perl00
Gear group perl-5.10 is started

Comment 2 Clayton Coleman 2013-01-23 19:32:02 UTC
Fixed in https://github.com/openshift/rhc/pull/283

Comment 3 openshift-github-bot 2013-01-23 21:45:09 UTC
Commit pushed to master at https://github.com/openshift/rhc

https://github.com/openshift/rhc/commit/2dae3c7047052cdd6c23607551df37230e7d0850
Bug 903164 - Arguments with an app_context not being pulled off the stack

Comment 4 chunchen 2013-01-24 02:19:38 UTC
Verified with rhc-1.3.8, this commands can all work well.