Bug 991250 - 'rhc' command does not read the default configuration file in /etc/openshift/
'rhc' command does not read the default configuration file in /etc/openshift/
Product: OpenShift Online
Classification: Red Hat
Component: Command Line Interface (Show other bugs)
Unspecified Unspecified
low Severity medium
: ---
: ---
Assigned To: Fabiano Franz
libra bugs
Depends On:
  Show dependency treegraph
Reported: 2013-08-01 21:06 EDT by Ma xiaoqiang
Modified: 2016-07-03 20:44 EDT (History)
2 users (show)

See Also:
Fixed In Version:
Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of:
Last Closed: 2014-01-29 19:48:14 EST
Type: Bug
Regression: ---
Mount Type: ---
Documentation: ---
Verified Versions:
Category: ---
oVirt Team: ---
RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: ---

Attachments (Terms of Use)

  None (edit)
Description Ma xiaoqiang 2013-08-01 21:06:57 EDT
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):

How reproducible:

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 

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-17 19:13:05 EST
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 12:58:45 EST
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 14:43:16 EST
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 15:46:39 EST
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-05 19:41:41 EST
Commits pushed to master at https://github.com/openshift/rhc

Bug 991250 - 'rhc' must call wizard with the same context as 'rhc setup'

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-05 21:32:58 EST
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.