Bug 822833

Summary: rhc server does not read the server address from ~/.openshift/express.conf or take --config as an option
Product: OKD Reporter: Meng Bo <bmeng>
Component: ocAssignee: John (J5) Palmieri <johnp>
Status: CLOSED CURRENTRELEASE QA Contact: libra bugs <libra-bugs>
Severity: medium Docs Contact:
Priority: medium    
Version: 2.xCC: dmcphers, jkeck, rmillner, xtian
Target Milestone: ---Keywords: Triaged
Target Release: ---   
Hardware: Unspecified   
OS: Unspecified   
Whiteboard:
Fixed In Version: 0.93.17-1 Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of: Environment:
Last Closed: 2012-06-08 17:58:57 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 Meng Bo 2012-05-18 10:01:36 UTC
Description of problem:
install the latest rhc client (0.93.2), run rhc directly in the terminal. 'rhc status' shows in the 'List of resources' but cannot take effect.

Version-Release number of selected component (if applicable):
rhc-0.93.2-1.el6_2.noarch

How reproducible:
always

Steps to Reproduce:
1.install rhc client
2.run rhc command
# rhc
3.
  
Actual results:
after run 'rhc status', only one message "Check server status“ returns.

Expected results:
should check the server status and return it correctly.

Additional info:
[bmeng@localhost ~]$ rhc

Usage: rhc (<resource> | --help) [<command>] [<args>]
Command line tool for performing operations related to your rhcloud account.

List of resources
  domain             Manage the namespace for the registered rhcloud user.
  app                Manage applications within the rhcloud account.
  sshkey             Manage multiple keys for the registered rhcloud user.
  port-forward       Forward remote ports to the workstation
  status             Display information about the status of the service.

See 'rhc <resource> --help' for more applicable commands and argumments on a specific resource.

Comment 1 Xiaoli Tian 2012-05-25 13:07:50 UTC
Tested this on devenv_1802 with rhc-0.93.11

#rhc server
error: 404 Resource Not Found: <!doctype html>
<html>
<head>
  <meta charset="utf-8">
  <title>Page Not Found :(</title> 
  <style>
	  body { text-align: center;}
	  h1 { font-size: 50px; text-align: center }
	  span[frown] { transform: rotate(90deg); display:inline-block; color: #bbb; }
	  body { font: 20px Constantia, 'Hoefler Text',  "Adobe Caslon Pro", Baskerville, Georgia, Times, serif; color: #999; text-shadow: 2px 2px 2px rgba(200, 200, 200, 0.5); }
	  ::-moz-selection{ background:#FF5E99; color:#fff; }
	  ::selection { background:#FF5E99; color:#fff; } 
	  article {display:block; text-align: left; width: 500px; margin: 0 auto; }
	  
	  a { color: rgb(36, 109, 56); text-decoration:none; }
	  a:hover { color: rgb(96, 73, 141) ; text-shadow: 2px 2px 2px rgba(36, 109, 56, 0.5); }
  </style>
</head>
<body>
     <article>
	  <h1>Not found <span frown>:(</span></h1>
	   <div>
	       <p>Sorry, but the page you were trying to view does not exist.</p>
	       <p>It looks like this was the result of either:</p>
	       <ul>
		   <li>a mistyped address</li>
		   <li>an out-of-date link</li>
	       </ul>
	   </div>
	    
	    <script>
	    var GOOG_FIXURL_LANG = (navigator.language || '').slice(0,2),
		GOOG_FIXURL_SITE = location.host;
	    </script>
	    <script src="http://linkhelp.clients.google.com/tbproxy/lh/wm/fixurl.js"></script>
     </article>
</body>
</html>. Use --trace to view backtrace

Comment 2 John (J5) Palmieri 2012-05-29 17:25:59 UTC
This works on the latest dev image.  I'm not sure how to set my proxy on the command line to hit stageing but I suspect it works there also. This does not work against production because it requres new features on the server which are being deployed this sprint.

Comment 3 Xiaoli Tian 2012-05-30 12:35:00 UTC
Hi, John

It still does not work for QE, what's your return result?  QE still see the 404 error page by just running rhc server, is there any special config needed?

Thanks

Comment 4 John (J5) Palmieri 2012-05-30 17:05:45 UTC
You need to point it to the correct server using LIBRA_SERVER=... rhc server or passing in a config file with --config.  I just get Server running as output but I have had trouble testing today because of issues proxying to the dev env.

Comment 5 John (J5) Palmieri 2012-05-30 19:23:22 UTC
$ LIBRA_SERVER=ec2-107-21-182-114.compute-1.amazonaws.com rhc server
All systems running fine

Comment 6 Xiaoli Tian 2012-05-31 09:22:30 UTC
Hi, John

It works with your steps:

LIBRA_SERVER=ec2-107-21-169-161.compute-1.amazonaws.com rhc server
#11 OpenshiftOutage
    Opened                                                                                                                 4:42 AM
    We are currently experiencing some technical difficulties with authentication. We expect to have it resolved shortly.  4:42 AM

1 open issue


LIBRA_SERVER=int.openshift.redhat.com  rhc server
All systems running fine


Maybe after the change is push to prod, it will work by only typing rhc server.

But it's better to let rhc server to find the server in ~/.openshift/express.conf  automatically so that we do not need to set the environment variable while testing stage, int, and devenv.

Thanks

Comment 7 John (J5) Palmieri 2012-05-31 17:45:10 UTC
I see, didn't notice that bug.  Changing the title.

Comment 8 John (J5) Palmieri 2012-05-31 19:57:50 UTC
I have a fixed lined up as soon as someone reviews and merges it I will ask for it to be pulled into the stage branch

Fix now allows you to use /etc/openshift/express.conf, ~/.openshift/express.conf, --config foo.conf, or LIBRA_SERVER=https://bar.baz - order of precedence is same for all other rhc commands

Comment 9 Xiaoli Tian 2012-06-01 08:51:14 UTC
Verified it with rhc-0.93.18-1.el6_2.noarch, it will read the ~/.openshift/express.conf and respect --config 


[xiaoli@localhost 601]$ rhc server --config express.conf
All systems running fine


[xiaoli@localhost 601]$ rhc server
All systems running fine