Bug 861527 - rhc setup will encounter exception if .ssh/id_rsa.pub is removed but .ssh/id_rsa remains
Summary: rhc setup will encounter exception if .ssh/id_rsa.pub is removed but .ssh/id_...
Keywords:
Status: CLOSED DUPLICATE of bug 861023
Alias: None
Product: OKD
Classification: Red Hat
Component: oc
Version: 2.x
Hardware: Unspecified
OS: Linux
unspecified
low
Target Milestone: ---
: ---
Assignee: Clayton Coleman
QA Contact: libra bugs
URL:
Whiteboard:
Depends On:
Blocks:
TreeView+ depends on / blocked
 
Reported: 2012-09-29 00:19 UTC by Peter Ruan
Modified: 2015-05-15 02:05 UTC (History)
1 user (show)

Fixed In Version:
Doc Type: Bug Fix
Doc Text:
Clone Of:
Environment:
Last Closed: 2012-09-29 03:17:35 UTC
Target Upstream Version:
Embargoed:


Attachments (Terms of Use)

Description Peter Ruan 2012-09-29 00:19:58 UTC
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-29 03:17:35 UTC

*** 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.