Bug 797430 - 'rhc domain status' fails on ssh key error but 'rhc domain show' works just fine
Summary: 'rhc domain status' fails on ssh key error but 'rhc domain show' works just fine
Keywords:
Status: CLOSED CURRENTRELEASE
Alias: None
Product: OKD
Classification: Red Hat
Component: oc
Version: 2.x
Hardware: Unspecified
OS: Unspecified
high
low
Target Milestone: ---
: ---
Assignee: John (J5) Palmieri
QA Contact: libra bugs
URL:
Whiteboard:
Depends On:
Blocks:
TreeView+ depends on / blocked
 
Reported: 2012-02-25 19:43 UTC by Adam Miller
Modified: 2015-05-15 01:47 UTC (History)
6 users (show)

Fixed In Version: rhc-0.90.2
Doc Type: Bug Fix
Doc Text:
Clone Of:
Environment:
Last Closed: 2012-04-13 18:31:17 UTC
Target Upstream Version:


Attachments (Terms of Use)

Description Adam Miller 2012-02-25 19:43:27 UTC
Description of problem:
'rhc domain show' fails on ssh key error but 'rhc domain status' works just fine

Version-Release number of selected component (if applicable):
rubygem-rhc-0.85.12-1.fc16.noarch

How reproducible:
Every time.

Steps to Reproduce:
[13:41:04][adam@vostro][0][~]-> rhc domain show -l maxamillion: 

User Info
=========
Namespace: maxamillion
  RHLogin: maxamillion


Application Info
================
rewardie
    Framework: php-5.3
     Creation: 2012-02-23T20:22:35-05:00
         UUID: $scrubbed_output
      Git URL: ssh://$scrubbed_output.com/~/git/rewardie.git/
   Public URL: http://rewardie-maxamillion.rhcloud.com/

 Embedded: 
      mysql-5.1 - Connection URL: mysql://$scrubbed_output:3306/
      phpmyadmin-3.4 - URL: https://rewardie-maxamillion.rhcloud.com/phpmyadmin/

[13:41:12][adam@vostro][0][~]-> rhc domain status -l maxamillion
Password: 
Analyzing system
..Enter passphrase: 
load failed
FEF..
=================================================
||  Your system did not pass all of the tests  ||
=================================================
1) We were unable to derive your public SSH key and compare it to the remote FIX: ???.
2) File /home/adam/.ssh/config does not exist, cannot check permissions.

=========================================================
||  Something went wrong, and not all tests completed  ||
=========================================================
1) test_02_ssh_public_key(Test3_SSH):
	NoMethodError: undefined method `include?' for nil:NilClass
	    /usr/lib/ruby/gems/1.8/gems/rhc-0.85.12/bin/rhc-chk:316:in `test_02_ssh_public_key'

Comment 1 Abhishek Gupta 2012-02-29 18:22:41 UTC
Can QA please verify this or help reproduce this? 

I am unable to reproduce this bug. Also, the only possibility of creating applications without having ssh keys set up is when the REST calls are used to create an application or when the CLI command specified the '--nogit' option. 

As such, if the ssh keys are not set or added to the domain, the "rhc domain status" command is bound to fail.

Comment 2 jizhao 2012-03-01 03:24:51 UTC
Reproduced on devenv-stage_139
Version: rhc-0.87.7-1.el6_2.noarch

Steps to reproduce:
1. Remove your libra key pair under ~/.ssh and create a new pair with a passphrase.
$ rm -f .ssh/libra_*
$ rhc domain alter -n jizhao
2. Run "rhc domain status -d" and enter a wrong passphrase

Actual Results:
<------------output------------->
=========================================================
||  Something went wrong, and not all tests completed  ||
=========================================================
1) test_02_ssh_public_key(Test3_SSH):
	NoMethodError: undefined method `include?' for nil:NilClass
	    /usr/lib/ruby/gems/1.8/gems/rhc-0.87.7/bin/rhc-chk:329:in `test_02_ssh_public_key'
<------------------------------->

Comment 3 Abhishek Gupta 2012-03-05 18:16:13 UTC
Assigning to Clayton as a placeholder while we find a new dev owner for the CLI tools.

Comment 4 John (J5) Palmieri 2012-04-05 21:47:48 UTC
fixed in commit 80beaf7ea5f69ebf3487d64583386d31fd4b286b

We were asserting in the first test before the global $remote_ssh_pubkeys was set to an empty array.  Subsequent tests expected an array even if it was empty.  Move setting the global to before any asserts are evaluated in the first test.

Comment 5 Meng Bo 2012-04-10 02:28:11 UTC
checked with rhc-0.90.1-1.el6_2.noarch,
still get the error message with key files have incorrect permissions

===========
[bmeng@localhost .ssh]$ rhc domain status
Password: 
Analyzing system
..FE...
=================================================
||  Your system did not pass all of the tests  ||
=================================================
1) File /home/bmeng/.ssh/libra_id_rsa has incorrect permissions 777
	Permissions should match /home/bmeng/.ssh/libra_id_rsa.

=========================================================
||  Something went wrong, and not all tests completed  ||
=========================================================
1) test_02_ssh_public_key(Test3_SSH):
	NoMethodError: undefined method `include?' for nil:NilClass
	    /usr/lib/ruby/gems/1.8/gems/rhc-0.90.1/bin/rhc-chk:308:in `test_02_ssh_public_key'

Comment 6 John (J5) Palmieri 2012-04-10 15:10:18 UTC
fixed in b60e7a2423a8f50d057ec6ee0870eade8159e2e1

the permission check also asserts so I had to initialize the global at the very top of the test to ensure that it is assigned for later tests.

Comment 7 Meng Bo 2012-04-12 07:17:17 UTC
verified with latest rhc client rhc-0.90.5
issue has been fixed.


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