Description of problem: Add multiple servers,set one as default.Delete express.conf under .openshift. server.yml is still existing. Do 'server list',show "You don't have any servers configured. Use 'rhc setup' to configure your OpenShift server."Do domain show operation,will login to PROD server always. RHC will check express.conf firstly. # rhc server list -d DEBUG: Using config file /root/.openshift/express.conf You don't have any servers configured. Use 'rhc setup' to configure your OpenShift server. Version-Release number of selected component (if applicable): rhc-1.29.5 How reproducible: always Steps to Reproduce: 1.Add some servers, set one as default. 2.Do server list 3.Delele express.conf 4.Do 'rhc server list' 5.Do 'rhc Domain show' Actual results: step2.Could list servers # rhc server list Server 'int' (in use) --------------------- Hostname: int.openshift.redhat.com Login: xiuwang+m Use Auth Tokens: true Insecure: false Server 'stg' ------------ Hostname: stg.openshift.redhat.com Login: xiuwang Use Auth Tokens: true Insecure: false setp4. # rhc server list You don't have any servers configured. Use 'rhc setup' to configure your OpenShift server. step5.Actually, have set int as default server.but domain show will login PROD. # rhc domain show You have not yet configured the OpenShift client tools. Please run 'rhc setup'. Login to openshift.redhat.com: Expected results: Could use the correct server. Additional info:
Looks live this one is fixed by the same fix in bug 1126388: https://github.com/openshift/rhc/pull/642 'rhc servers' will still list the ones present in servers.yml and online (prod) will be displayed as the default (in use). Please test.
Check with rhc-1.29.6 build from devenv_4096 1.When openshift.redhat.com not configured and no express.conf existing,still show warning. # rhc server list Server 'int' ------------ Hostname: int.openshift.redhat.com Login: XXXXXX Use Auth Tokens: true Insecure: false Server 'stg' (in use) --------------------- Hostname: stg.openshift.redhat.com Login: XXXXXXXXXXX Use Auth Tokens: true Insecure: false You have 2 servers configured. Use 'rhc server use <hostname|nickname>' to switch between them. # rm express.conf # rhc server list You don't have any servers configured. Use 'rhc setup' to configure your OpenShift server.
Correct comment 2 Check this bug with rhc-1.29.6 build from devenv_5089.
That's the expected behavior. When you have multiple servers on servers.yml the express.conf file is used to define which of them is the default one (in use). If you don't have the default one declared on express.conf (or no express.conf at all) then the online server is supposed to be the default one. Not having express.conf (makes online the default) *and* not having online configured in servers.yml means you don't have a proper servers configuration and should run rhc setup to fix it.
(In reply to Fabiano Franz from comment #4) Move bug to verified. Fabiano, Thanks!