Bug 861527

Summary: rhc setup will encounter exception if .ssh/id_rsa.pub is removed but .ssh/id_rsa remains
Product: OKD Reporter: Peter Ruan <pruan>
Component: ocAssignee: Clayton Coleman <ccoleman>
Status: CLOSED DUPLICATE QA Contact: libra bugs <libra-bugs>
Severity: low Docs Contact:
Priority: unspecified    
Version: 2.xCC: xtian
Target Milestone: ---   
Target Release: ---   
Hardware: Unspecified   
OS: Linux   
Whiteboard:
Fixed In Version: Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of: Environment:
Last Closed: 2012-09-29 03:17:35 UTC Type: Bug
Regression: --- Mount Type: ---
Documentation: --- CRM:
Verified Versions: Category: ---
oVirt Team: --- RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: --- Target Upstream Version:
Embargoed:

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