Bug 824318 - The "rhc sshkey list " will be failed in Mac
The "rhc sshkey list " will be failed in Mac
Status: CLOSED CURRENTRELEASE
Product: OpenShift Origin
Classification: Red Hat
Component: Command Line Interface (Show other bugs)
2.x
Unspecified Unspecified
medium Severity high
: ---
: ---
Assigned To: Fabiano Franz
libra bugs
: Triaged
Depends On:
Blocks:
  Show dependency treegraph
 
Reported: 2012-05-23 05:37 EDT by yquan
Modified: 2015-05-14 21:54 EDT (History)
2 users (show)

See Also:
Fixed In Version: rhc-0.93.16+
Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of:
Environment:
Last Closed: 2012-06-08 13:58:36 EDT
Type: Bug
Regression: ---
Mount Type: ---
Documentation: ---
CRM:
Verified Versions:
Category: ---
oVirt Team: ---
RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: ---


Attachments (Terms of Use)

  None (edit)
Description yquan 2012-05-23 05:37:05 EDT
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 04:42:40 EDT
checked with latest rhc client rhc-0.93.15,
issue still can be reproduced.
Comment 2 Fabiano Franz 2012-05-30 14:30:36 EDT
Fixed on rhc-0.93.15+, tested on a MacOSX Lion.
Comment 3 yquan 2012-05-31 03:29:16 EDT
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 13:03:10 EDT
Worked on my Mac box yesterday, I will try to reproduce and fix.
Comment 5 Fabiano Franz 2012-05-31 16:49:34 EDT
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-05-31 22:13:15 EDT
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.