Bug 836483 - rhc domain status always fail
rhc domain status always fail
Product: OpenShift Origin
Classification: Red Hat
Component: Command Line Interface (Show other bugs)
Unspecified Unspecified
high Severity medium
: ---
: ---
Assigned To: Fotios Lindiakos
libra bugs
: Triaged
: 838505 (view as bug list)
Depends On:
  Show dependency treegraph
Reported: 2012-06-29 04:28 EDT by Jianwei Hou
Modified: 2015-05-14 21:59 EDT (History)
5 users (show)

See Also:
Fixed In Version:
Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of:
Last Closed: 2012-08-07 16:42:15 EDT
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 Jianwei Hou 2012-06-29 04:28:25 EDT
Description of problem:
run rhc-chk, the CLI returns Failure

Version-Release number of selected component (if applicable):
on stg/int/devenv
ruby 1.8.7

How reproducible:

Steps to Reproduce:
1.[hjw@my .ssh]$ rhc sshkey list
Password: ******

SSH keys
       Name: default
       Type: ssh-rsa
Fingerprint: d7:61:0f:94:f5:02:51:18:dc:c6:7b:54:73:c5:eb:4e

       Name: rhel6
       Type: ssh-rsa
Fingerprint: f0:21:f5:e2:d5:c1:93:1a:b0:54:1c:99:39:4f:d8:3b

[hjw@my ~]$ ps -ef|grep ssh-agent
hjw        535     1  0 16:17 ?        00:00:00 ssh-agent

3.ssh-add /home/hjw/.ssh/id_rsa
[hjw@my test]$ ssh-add -l
2048 d7:61:0f:94:f5:02:51:18:dc:c6:7b:54:73:c5:eb:4e /home/hjw/.ssh/id_rsa (RSA)

4.run rhc domain show to make sure client is able to connect to server
[hjw@my test]$ rhc domain show
Password: ******

User Info
Namespace: jhou
  RHLogin: jhou@redhat.com

Application Info
    Framework: nodejs-0.6
     Creation: 2012-06-29T02:30:43-04:00
         UUID: ba8f8d77860f4ef5a345677e7ae3883d
      Git URL: ssh://ba8f8d77860f4ef5a345677e7ae3883d@napp-jhou.stg.rhcloud.com/~/git/napp.git/
   Public URL: http://napp-jhou.stg.rhcloud.com/


5.run rhc-chk
Actual results:
[hjw@my test]$ rhc-chk 
Password: ******

Loaded suite /usr/bin/rhc-chk
ArgumentError: too few arguments
    /usr/lib/ruby/gems/1.8/gems/rhc-0.95.5/bin/rhc-chk:204:in `sprintf'
    /usr/lib/ruby/gems/1.8/gems/rhc-0.95.5/bin/rhc-chk:204:in `error_for'
    /usr/lib/ruby/gems/1.8/gems/rhc-0.95.5/bin/rhc-chk:270:in `test_connectivity'
test_authentication(Test2_Authentication) [/usr/lib/ruby/gems/1.8/gems/rhc-0.95.5/bin/rhc-chk:280]:
You need to be able to connect to the server in order to test authentication.
<false> is not true.
    [/usr/lib/ruby/gems/1.8/gems/rhc-0.95.5/bin/rhc-chk:317:in `require_login'
     /usr/lib/ruby/gems/1.8/gems/rhc-0.95.5/bin/rhc-chk:321:in `require_remote_keys'
     /usr/lib/ruby/gems/1.8/gems/rhc-0.95.5/bin/rhc-chk:376:in `test_03_remote_ssh_keys']:
You must have an account on the server in order to test: whether you have a valid key loaded in your agent.
    [/usr/lib/ruby/gems/1.8/gems/rhc-0.95.5/bin/rhc-chk:317:in `require_login'
     /usr/lib/ruby/gems/1.8/gems/rhc-0.95.5/bin/rhc-chk:383:in `test_04_ssh_connect']:
You must have an account on the server in order to test: connecting to your applications.

Finished in 5.282162 seconds.

7 tests, 8 assertions, 3 failures, 1 errors, 0 pendings, 0 omissions, 0 notifications
42.8571% passed

1.33 tests/s, 1.51 assertions/s

Expected results:
rhc-chk should run without errors,test would pass

Additional info:
Comment 1 David O'Brien 2012-07-04 01:46:50 EDT
This still appears in 0.95.7 but apparently not in 94.4
Comment 2 Xiaoli Tian 2012-07-09 05:59:16 EDT
*** Bug 838505 has been marked as a duplicate of this bug. ***
Comment 3 Clayton Coleman 2012-07-09 11:42:55 EDT
ArgumentError: too few arguments
Comment 4 Fotios Lindiakos 2012-07-11 17:15:10 EDT
This appears to be a few different issues, but I think I got them all. I ran across some other issues that may or may not have been related. 

Fixes are here: https://github.com/openshift/os-client-tools/pull/97
Comment 5 Jianwei Hou 2012-07-12 02:51:36 EDT
tested on dev-stage_223 
ruby 1.8.7

still have the above problem.
I compared /usr/lib/ruby/gems/1.8/gems/rhc-0.95.13/bin/rhc-chk with committed code in  https://github.com/openshift/os-client-tools/pull/97, and they are different.

Then I replaced /usr/lib/ruby/gems/1.8/gems/rhc-0.95.13/bin/rhc-chk with the new fix and the problem is gone now.

Since the fixes are not deployed into our lates CLI, I will keep this bug as ON_QA untill it is deployed in our new CLI next time.
Comment 6 Xiaoli Tian 2012-07-12 08:49:38 EDT
Will test it tomorrow after the pull request is merged
Comment 7 Jianwei Hou 2012-07-15 21:47:21 EDT
verified on stage
CLI: rhc-0.95.14
ruby 1.8.7

1.eval `ssh-agent`
2.ssh-add ~/.ssh/id_rsa
3.rhc-chk or rhc domain status

Loaded suite /usr/bin/rhc-chk

Finished in 9.025879 seconds.

7 tests, 9 assertions, 0 failures, 0 errors, 0 pendings, 0 omissions, 0 notifications
100% passed

0.78 tests/s, 1.00 assertions/s

check passed

fixed in rhc-0.95.14

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