Bug 824318 - The "rhc sshkey list " will be failed in Mac
Summary: The "rhc sshkey list " will be failed in Mac
Keywords:
Status: CLOSED CURRENTRELEASE
Alias: None
Product: OKD
Classification: Red Hat
Component: oc
Version: 2.x
Hardware: Unspecified
OS: Unspecified
medium
high
Target Milestone: ---
: ---
Assignee: Fabiano Franz
QA Contact: libra bugs
URL:
Whiteboard:
Depends On:
Blocks:
TreeView+ depends on / blocked
 
Reported: 2012-05-23 09:37 UTC by yquan
Modified: 2015-05-15 01:54 UTC (History)
2 users (show)

Fixed In Version: rhc-0.93.16+
Doc Type: Bug Fix
Doc Text:
Clone Of:
Environment:
Last Closed: 2012-06-08 17:58:36 UTC
Target Upstream Version:
Embargoed:


Attachments (Terms of Use)

Description yquan 2012-05-23 09:37:05 UTC
Description of problem:
The "rhc sshkey list " will be failed in Mac.

Version-Release number of selected component (if applicable):
rhc-0.93.6
ruby-1.8.7
gem-1.3.5

How reproducible:
Always

Steps to Reproduce:
1.Create a domain on Mac os.
2.Run "rhc sshkey list "
3.
  
Actual results:
It will be failed, and return the message like below.

/Library/Ruby/Gems/1.8/gems/rhc-0.93.6/lib/rhc-common.rb:309:in `get_ssh_keys': undefined method `load_data_public_key' for Net::SSH::KeyFactory:Class (NoMethodError)
	from /Library/Ruby/Gems/1.8/gems/rhc-0.93.6/bin/rhc-sshkey:71:in `show_key_list'
	from /Library/Ruby/Gems/1.8/gems/rhc-0.93.6/bin/rhc-sshkey:164
	from /usr/bin/rhc-sshkey:19:in `load'
	from /usr/bin/rhc-sshkey:19



Expected results:
It should the sshkey information correctly.

Additional info:

Comment 1 Meng Bo 2012-05-30 08:42:40 UTC
checked with latest rhc client rhc-0.93.15,
issue still can be reproduced.

Comment 2 Fabiano Franz 2012-05-30 18:30:36 UTC
Fixed on rhc-0.93.15+, tested on a MacOSX Lion.

Comment 3 yquan 2012-05-31 07:29:16 UTC
It is not fixed on rhc-0.93.16..


output:

OpenShiftmatoMacBook-Pro:~ root# rhc sshkey list
Password: **

/Library/Ruby/Gems/1.8/gems/rhc-0.93.16/lib/rhc-common.rb:311:in `get_ssh_keys': undefined method `load_data_public_key' for Net::SSH::KeyFactory:Class (NoMethodError)
	from /Library/Ruby/Gems/1.8/gems/rhc-0.93.16/bin/rhc-sshkey:71:in `show_key_list'
	from /Library/Ruby/Gems/1.8/gems/rhc-0.93.16/bin/rhc-sshkey:164
	from /usr/bin/rhc-sshkey:23:in `load'
	from /usr/bin/rhc-sshkey:23

Comment 4 Fabiano Franz 2012-05-31 17:03:10 UTC
Worked on my Mac box yesterday, I will try to reproduce and fix.

Comment 5 Fabiano Franz 2012-05-31 20:49:34 UTC
Fixed. 
I was *not* able to simulate this issue in the 2 Macbooks I got here, so I guess it's probably related to older versions of Mac OS, with older Ruby and net/ssh.
Anyway I added a fallback to native tools (ssh-keygen) if the pure Ruby version fails.

Comment 6 yquan 2012-06-01 02:13:15 UTC
It fixed on rhc-0.93.18.

OpenShiftmatoMacBook-Pro:~ root# rhc sshkey list
Password: **


SSH keys
========
       Name: default
       Type: ssh-rsa
Fingerprint: 62:59:bf:8d:6a:d7:ce:15:7e:ba:71:8c:10:62:13:d9


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