Bug 991250 - 'rhc' command does not read the default configuration file in /etc/openshift/
Summary: 'rhc' command does not read the default configuration file in /etc/openshift/
Keywords:
Status: CLOSED CURRENTRELEASE
Alias: None
Product: OpenShift Online
Classification: Red Hat
Component: oc
Version: 2.x
Hardware: Unspecified
OS: Unspecified
low
medium
Target Milestone: ---
: ---
Assignee: Fabiano Franz
QA Contact: libra bugs
URL:
Whiteboard:
Depends On:
Blocks:
TreeView+ depends on / blocked
 
Reported: 2013-08-02 01:06 UTC by Ma xiaoqiang
Modified: 2016-07-04 00:44 UTC (History)
2 users (show)

Fixed In Version:
Doc Type: Bug Fix
Doc Text:
Clone Of:
Environment:
Last Closed: 2014-01-30 00:48:14 UTC
Target Upstream Version:
Embargoed:


Attachments (Terms of Use)

Description Ma xiaoqiang 2013-08-02 01:06:57 UTC
Description of problem:
After removing  ~/.openshift/ and update broker in /etc/openshift/express.conf.   'rhc' command doesn't read the configuration file in /etc/openshift/. 
But run `rhc setup`,could read the default configuration file.

Version-Release number of selected component (if applicable):
rhc-1.12.4

How reproducible:
always

Step to Reproduce:
1.configure the file like below:
# cat /etc/openshift/express.conf
# Remote API server
libra_server = 'broker.rhn.com'
2.delete the local configration
#rm -rf  ~/.openshift/
3.execute the command to login 
#rhc

Actual results:
the command try to login to openshift.redhat.com

the result like below
[root@localhost ~]# rhc
OpenShift Client Tools (RHC) Setup Wizard

This wizard will help you upload your SSH keys, set your application namespace, and check that other programs like Git are properly installed.

Login to openshift.redhat.com:

Expected results:

the help content of rhc should be given ,or try to login to broker.rhn.com

Comment 1 Clayton Coleman 2013-12-18 00:13:05 UTC
I'm pretty sure we removed all support for this, and didn't intend it to be used anywhere except for 'rhc setup'.

Comment 2 Fabiano Franz 2014-01-03 17:58:45 UTC
When removing ~/.openshift/express.conf and keeping /etc/openshift/express.conf with a given libra_server:

- single 'rhc' command launches the wizard against openshift.redhat.com
- 'rhc setup' launches it against the libra_server configured on /etc/openshift/express.conf

The wizard should behave equally on these two scenarios.

(In reply to Clayton Coleman from comment #1)
> I'm pretty sure we removed all support for this, and didn't intend it to be
> used anywhere except for 'rhc setup'.

Comment 3 Fabiano Franz 2014-01-03 19:43:16 UTC
Fixed in https://github.com/openshift/rhc/pull/531

The single 'rhc' command should now launch the wizard using the same context as 'rhc setup'. Every other command will still ignore /etc/openshift/express.conf.

Comment 4 Fabiano Franz 2014-01-03 20:46:39 UTC
In fact we decided to change this. When calling 'rhc' alone we will display the help no matter if OpenShift is configured or not. Please validate.

Comment 5 openshift-github-bot 2014-01-06 00:41:41 UTC
Commits pushed to master at https://github.com/openshift/rhc

https://github.com/openshift/rhc/commit/5bddda5b0d018e4d6995767190f5f629b121d9d7
Bug 991250 - 'rhc' must call wizard with the same context as 'rhc setup'

https://github.com/openshift/rhc/commit/ef28bd06e0634da00ba6d4c0d71d344fbb6c5ba1
Bug 991250 - changed the behavior of the 'rhc' command called alone to display help instead of the wizard if it's not configured

Comment 6 Ma xiaoqiang 2014-01-06 02:32:58 UTC
check on devenv_4186
1.remove all configuration, then run the rhc command.
2.run "rhc setup", then run rhc
3.remove ~/.openshift/express.conf and keep /etc/openshift/express.conf, then run rhc command

The output of the three scenarios is the help content.


Note You need to log in before you can comment on or make changes to this bug.