Bug 861527 - rhc setup will encounter exception if .ssh/id_rsa.pub is removed but .ssh/id_rsa remains
rhc setup will encounter exception if .ssh/id_rsa.pub is removed but .ssh/id_...
Status: CLOSED DUPLICATE of bug 861023
Product: OpenShift Origin
Classification: Red Hat
Component: Command Line Interface (Show other bugs)
2.x
Unspecified Linux
unspecified Severity low
: ---
: ---
Assigned To: Clayton Coleman
libra bugs
:
Depends On:
Blocks:
  Show dependency treegraph
 
Reported: 2012-09-28 20:19 EDT by Peter Ruan
Modified: 2015-05-14 22:05 EDT (History)
1 user (show)

See Also:
Fixed In Version:
Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of:
Environment:
Last Closed: 2012-09-28 23:17:35 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 Peter Ruan 2012-09-28 20:19:58 EDT
Description of problem

if we removed .ssh/id_rsa.pub but keep .ssh/id_rsa and run rhc setup, user will see the following exception

/usr/lib64/ruby/gems/1.8/gems/net-ssh-2.6.0/lib/net/ssh/key_factory.rb:100:in `read': No such file or directory - /home/peter/.ssh/id_rsa.pub (Errno::ENOENT)
	from /usr/lib64/ruby/gems/1.8/gems/net-ssh-2.6.0/lib/net/ssh/key_factory.rb:100:in `load_public_key'
	from /usr/lib64/ruby/gems/1.8/gems/rhc-0.99.3/lib/rhc/wizard.rb:149:in `ssh_key_uploaded?'
	from /usr/lib64/ruby/gems/1.8/gems/rhc-0.99.3/lib/rhc/wizard.rb:243:in `upload_ssh_key_stage'
	from /usr/lib64/ruby/gems/1.8/gems/rhc-0.99.3/lib/rhc/wizard.rb:48:in `send'
	from /usr/lib64/ruby/gems/1.8/gems/rhc-0.99.3/lib/rhc/wizard.rb:48:in `run'
	from /usr/lib64/ruby/gems/1.8/gems/rhc-0.99.3/lib/rhc/wizard.rb:46:in `each'
	from /usr/lib64/ruby/gems/1.8/gems/rhc-0.99.3/lib/rhc/wizard.rb:46:in `run'
	from /usr/lib64/ruby/gems/1.8/gems/rhc-0.99.3/lib/rhc/commands/setup.rb:11:in `run'
	from /usr/lib64/ruby/gems/1.8/gems/rhc-0.99.3/lib/rhc/commands.rb:103:in `send'
	from /usr/lib64/ruby/gems/1.8/gems/rhc-0.99.3/lib/rhc/commands.rb:103:in `to_commander'
	from /usr/lib64/ruby/gems/1.8/gems/commander-4.1.2/lib/commander/command.rb:180:in `call'
	from /usr/lib64/ruby/gems/1.8/gems/commander-4.1.2/lib/commander/command.rb:180:in `call'
	from /usr/lib64/ruby/gems/1.8/gems/commander-4.1.2/lib/commander/command.rb:155:in `run'
	from /usr/lib64/ruby/gems/1.8/gems/commander-4.1.2/lib/commander/runner.rb:402:in `run_active_command'
	from /usr/lib64/ruby/gems/1.8/gems/rhc-0.99.3/lib/rhc/command_runner.rb:30:in `run!'
	from /usr/lib64/ruby/gems/1.8/gems/commander-4.1.2/lib/commander/delegates.rb:7:in `run!'
	from /usr/lib64/ruby/gems/1.8/gems/rhc-0.99.3/lib/rhc/cli.rb:40:in `start'
	from /usr/lib64/ruby/gems/1.8/gems/rhc-0.99.3/bin/rhc:63
	from /usr/bin/rhc:23:in `load'
	from /usr/bin/rhc:23
[peter@unused-32-138 .ssh]$ ll
total 16
drwx------   2 peter peter 4096 Sep 28 17:01 .
drwx--x---+ 76 peter peter 4096 Sep 28 16:55 ..
-rw-------   1 peter peter 1679 Sep 28 17:00 id_rsa




Version-Release number of selected component (if applicable):
/usr/lib64/ruby/gems/1.8/gems/net-ssh-2.6.0/lib/net/ssh/key_factory.rb:100:in `read': No such file or directory - /home/peter/.ssh/id_rsa.pub (Errno::ENOENT)
	from /usr/lib64/ruby/gems/1.8/gems/net-ssh-2.6.0/lib/net/ssh/key_factory.rb:100:in `load_public_key'
	from /usr/lib64/ruby/gems/1.8/gems/rhc-0.99.3/lib/rhc/wizard.rb:149:in `ssh_key_uploaded?'
	from /usr/lib64/ruby/gems/1.8/gems/rhc-0.99.3/lib/rhc/wizard.rb:243:in `upload_ssh_key_stage'
	from /usr/lib64/ruby/gems/1.8/gems/rhc-0.99.3/lib/rhc/wizard.rb:48:in `send'
	from /usr/lib64/ruby/gems/1.8/gems/rhc-0.99.3/lib/rhc/wizard.rb:48:in `run'
	from /usr/lib64/ruby/gems/1.8/gems/rhc-0.99.3/lib/rhc/wizard.rb:46:in `each'
	from /usr/lib64/ruby/gems/1.8/gems/rhc-0.99.3/lib/rhc/wizard.rb:46:in `run'
	from /usr/lib64/ruby/gems/1.8/gems/rhc-0.99.3/lib/rhc/commands/setup.rb:11:in `run'
	from /usr/lib64/ruby/gems/1.8/gems/rhc-0.99.3/lib/rhc/commands.rb:103:in `send'
	from /usr/lib64/ruby/gems/1.8/gems/rhc-0.99.3/lib/rhc/commands.rb:103:in `to_commander'
	from /usr/lib64/ruby/gems/1.8/gems/commander-4.1.2/lib/commander/command.rb:180:in `call'
	from /usr/lib64/ruby/gems/1.8/gems/commander-4.1.2/lib/commander/command.rb:180:in `call'
	from /usr/lib64/ruby/gems/1.8/gems/commander-4.1.2/lib/commander/command.rb:155:in `run'
	from /usr/lib64/ruby/gems/1.8/gems/commander-4.1.2/lib/commander/runner.rb:402:in `run_active_command'
	from /usr/lib64/ruby/gems/1.8/gems/rhc-0.99.3/lib/rhc/command_runner.rb:30:in `run!'
	from /usr/lib64/ruby/gems/1.8/gems/commander-4.1.2/lib/commander/delegates.rb:7:in `run!'
	from /usr/lib64/ruby/gems/1.8/gems/rhc-0.99.3/lib/rhc/cli.rb:40:in `start'
	from /usr/lib64/ruby/gems/1.8/gems/rhc-0.99.3/bin/rhc:63
	from /usr/bin/rhc:23:in `load'
	from /usr/bin/rhc:23
[peter@unused-32-138 .ssh]$ ll
total 16
drwx------   2 peter peter 4096 Sep 28 17:01 .
drwx--x---+ 76 peter peter 4096 Sep 28 16:55 ..
-rw-------   1 peter peter 1679 Sep 28 17:00 id_rsa


How reproducible:
rhc (0.99.3)

Steps to Reproduce:
1. remove .ssh/id_rsa.pub but keep your .ssh/id_rsa file
2. run rhc setup
3.
  
Actual results:
encoutner exception above

Expected results:
pass

Additional info:
Comment 1 Xiaoli Tian 2012-09-28 23:17:35 EDT

*** This bug has been marked as a duplicate of bug 861023 ***

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