Hide Forgot
Description of problem: when do app control commands for app2 under app1 repo dir, it actually do operations on app1. Version-Release number of selected component (if applicable): rhc-1.15.3 How reproducible: always Steps to Reproduce: 1.create a app $app1 and git clone the app repo to local dir 2.cd repo dir 3.create another app $app2 4.try to control app2 with -a option rhc app stop -a app2 rhc app restart -a app2 rhc cartridge add mysql-5.1 -a app2 Actual results: # rhc app stop -a apps -d DEBUG: Using config file /root/.openshift/express.conf DEBUG: Git config 'git config --get rhc.app-id' returned '5247c93a6e0f5d6874000057' DEBUG: Git config 'git config --get rhc.app-name' returned 'app' DEBUG: Git config 'git config --get rhc.domain-name' returned 'wjiang' DEBUG: Authenticating with RHC::Auth::Token DEBUG: Connecting to https://10.4.59.132/broker/rest/api DEBUG: Client supports API versions 1.1, 1.2, 1.3, 1.4, 1.5 DEBUG: Using token authentication DEBUG: Created new httpclient DEBUG: Request GET https://10.4.59.132/broker/rest/api DEBUG: SSL Verification failed -- Using self signed cert DEBUG: code 200 1194 ms DEBUG: Server supports API versions 1.0, 1.1, 1.2, 1.3, 1.4 DEBUG: Using API version 1.4 DEBUG: Client API version 1.4 is not current. Refetching API DEBUG: Using token authentication DEBUG: Request GET https://10.4.59.132/broker/rest/api DEBUG: SSL Verification failed -- Using self signed cert DEBUG: code 200 1132 ms DEBUG: Getting all domains DEBUG: Using token authentication DEBUG: Request GET https://10.4.59.132/broker/rest/domains DEBUG: SSL Verification failed -- Using self signed cert DEBUG: code 200 1137 ms DEBUG: Getting all applications for domain wjiang DEBUG: Using token authentication DEBUG: Request GET https://10.4.59.132/broker/rest/domains/wjiang/applications DEBUG: SSL Verification failed -- Using self signed cert DEBUG: code 200 1447 ms DEBUG: Stopping application app force-false DEBUG: Using token authentication DEBUG: Request POST https://10.4.59.132/broker/rest/domains/wjiang/applications/app/events DEBUG: SSL Verification failed -- Using self signed cert DEBUG: code 200 7726 ms RESULT: stopped Expected results: It should use the given value instead of `git config` Additional info:
As a consequence of the fix here, 'rhc ssh' will now behave differently. In a app Git directory, you must run 'rhc ssh -- <command>' or 'rhc app-alias -- <alias>' in order to get the implicit value to work. This is because it's impossible to know for sure whether the first value is an app name or an alias.
https://github.com/openshift/rhc/pull/471
Needs a stage pull - didn't make the cut today.
Commit pushed to master at https://github.com/openshift/rhc https://github.com/openshift/rhc/commit/3725348374c05b2a621cf684b9be06cf71738179 Bug 1013321 - Handle implicit arguments more accurately When both arguments to a command are optional (rhc ssh <app> <command...>), if the user wants to use the default app - the current Git directory, for instance - then they must specify '--' in order to guarantee that <command> isn't confused for <app>. This commit changes that parsing behavior and cleans up the tests to ensure we are covering that case.
Tried on INT(devnev_stage_488) and this issue has been fixed. So verified it. Thanks