Bug 1018054

Summary: when do operation on an app under another app's repo dir which not belong to the same domain, 'Domain not found' message show up
Product: OpenShift Online Reporter: weiwei jiang <wjiang>
Component: ocAssignee: Clayton Coleman <ccoleman>
Status: CLOSED WONTFIX QA Contact: libra bugs <libra-bugs>
Severity: medium Docs Contact:
Priority: medium    
Version: 2.xCC: jliggitt, wsun
Target Milestone: ---Keywords: Reopened
Target Release: ---   
Hardware: Unspecified   
OS: Unspecified   
Whiteboard:
Fixed In Version: Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of: Environment:
Last Closed: 2014-06-06 17:50:39 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 weiwei jiang 2013-10-11 05:51:50 UTC
Description of problem:
when run `rhc domain show -l $login2` under an app repo dir of $login1, 'Domain not found.' show up.

Version-Release number of selected component (if applicable):
STG(devenv-stage_493)
rhc-1.15.6
How reproducible:
always

Steps to Reproduce:
1.use $login1 create a domain named "domain1"
rhc domain create "domain1" -l $login1
2.create a app and git clone to local dir with $login1
rhc app create $app1 php-5.3 -l $login1
3.use $$login2 create a domain named "domain2"
rhc domain create "domain2" -l $login2
4.run `rhc domain show -l $login2` under $app1 repo dir
5.check the output message

Actual results:
DEBUG: Using config file C:/Users/window7/.openshift/express.conf
DEBUG: Git config 'git config --get rhc.app-id' returned '52576b392587c86d120001
22'
DEBUG: Git config 'git config --get rhc.app-name' returned 'py33'
DEBUG: Git config 'git config --get rhc.domain-name' returned 'migrate'
DEBUG: Authenticating with RHC::Auth::Basic
DEBUG: Connecting to https://stg.openshift.redhat.com/broker/rest/api
DEBUG: Finding domain migrate
DEBUG: Client supports API versions 1.1, 1.2, 1.3, 1.4, 1.5
DEBUG: Created new httpclient
DEBUG: Request GET https://stg.openshift.redhat.com/broker/rest/api
DEBUG:    code 200 2953 ms
DEBUG: Server supports API versions 1.0, 1.1, 1.2, 1.3, 1.4, 1.5, 1.6
DEBUG:    Using API version 1.5
DEBUG: Client API version 1.5 is not current. Refetching API
DEBUG: Request GET https://stg.openshift.redhat.com/broker/rest/api
DEBUG:    code 200  296 ms
DEBUG: Request GET https://stg.openshift.redhat.com/broker/rest/domain/migrate
DEBUG:    code 404 1609 ms
Domain 'migrate' not found.



Expected results:
Should not display error message.

Additional info:

Comment 1 Clayton Coleman 2013-10-11 18:46:00 UTC
As designed (for now).  You'll need to specify something with -n.

Comment 2 weiwei jiang 2014-06-06 10:16:47 UTC
Reopen this issue for 
1. we support multiple domains
2. we aim to support multiple servers switch

So, when we do some operation on app under another app which not belong the same domain, the issue will be reproduced.

Comment 3 Jordan Liggitt 2014-06-06 17:50:39 UTC
Working as designed.

If you specify a domain on the command line, the command works.

If you do not specify a domain, RHC tries to figure out the domain from the environment, including the domain for the app repo of the current directory.

If you are in the repo directory of an app, and you want to use rhc to work with another app or domain, you have to provide the app or domain to rhc explicitly in the command line.