Bug 833759 - failed to generate SSH keys when altering domain
Summary: failed to generate SSH keys when altering domain
Keywords:
Status: CLOSED CURRENTRELEASE
Alias: None
Product: OKD
Classification: Red Hat
Component: oc
Version: 2.x
Hardware: Unspecified
OS: Windows
medium
low
Target Milestone: ---
: ---
Assignee: John (J5) Palmieri
QA Contact: libra bugs
URL:
Whiteboard:
Depends On:
Blocks:
TreeView+ depends on / blocked
 
Reported: 2012-06-20 10:14 UTC by Jianwei Hou
Modified: 2015-05-15 01:58 UTC (History)
3 users (show)

Fixed In Version:
Doc Type: Bug Fix
Doc Text:
Clone Of:
Environment:
Last Closed: 2012-07-13 23:43:19 UTC
Target Upstream Version:
Embargoed:


Attachments (Terms of Use)

Description Jianwei Hou 2012-06-20 10:14:07 UTC
Description of problem:
remove ssh key and then alter domain on windows,new ssh keys can't be generated.

Version-Release number of selected component (if applicable):
rhc (0.94.7)

How reproducible:
always

Steps to Reproduce:
1.create domain and create applications
2.remove ssh keys under C:\Users\window7\.ssh\
3.alter domain (rhc domain alter -a a1)
  
Actual results:
alter domain failed on windows
error messages are:

C:\Users\window7\test>rhc domain alter -n a1
Password: ******

WARNING: Unable to find 'C:/Users/window7/.ssh/id_rsa.pub'
Your SSH keys are created either by running ssh-keygen (password optional)
or by having the 'rhc domain create' command do it for you.  If you created
them on your own (or want to use an existing keypair), be sure to paste
your public key into the express console at http://www.openshift.com.
The client tools use the value of 'ssh_key_file' in express.conf to find
your key followed by the defaults of id_rsa[.pub] and then
id_rsa[.pub].
Generating OpenShift ssh key to C:/Users/window7/.ssh/id_rsa
C:/Ruby193/lib/ruby/gems/1.9.1/gems/rhc-0.94.7/bin/rhc-domain:84:in `initialize'
: No such file or directory - C:/Users/window7/.ssh/id_rsa.pub (Errno::ENOENT)
        from C:/Ruby193/lib/ruby/gems/1.9.1/gems/rhc-0.94.7/bin/rhc-domain:84:in
 `open'
        from C:/Ruby193/lib/ruby/gems/1.9.1/gems/rhc-0.94.7/bin/rhc-domain:84:in
 `create_or_alter_domain'
        from C:/Ruby193/lib/ruby/gems/1.9.1/gems/rhc-0.94.7/bin/rhc-domain:328:i
n `<top (required)>'
        from C:/Ruby193/bin/rhc-domain:23:in `load'
        from C:/Ruby193/bin/rhc-domain:23:in `<main>'

Expected results:
ssh keys should be generated,and alter domain will succeed.

Additional info:

Comment 1 Clayton Coleman 2012-06-22 15:52:36 UTC
The error message should be instructing the user to use 'rhc setup' instead of 'rhc domain create'.

Comment 2 joycezhang 2012-06-27 09:27:46 UTC
This error is also reproduced after only removing  ~/.ssh/libra_id_rsa.pub with build rhc 0.95.4.gem on Fedora 17. But it works fine when removing ~/.ssh/id_rsa.pub&id_rsa

Steps to reproduce:
1.Create one domain: rhc domain create -n test1 -l test
2.Change the ssh key by removing ~/.ssh/libra_id_rsa.pub
3.Alter domain name and ssh key for test: rhc domain create -n test2 -l -a test

Additional info:
#rhc domain create -n jinzhang55 -l -a  jinzhang+5
Password: ******

OpenShift key found at /root/.ssh/id_rsa.  Reusing...
/usr/local/share/gems/gems/rhc-0.95.4/bin/rhc-domain:84:in `initialize': No such file or directory - /root/.ssh/id_rsa.pub (Errno::ENOENT)
	from /usr/local/share/gems/gems/rhc-0.95.4/bin/rhc-domain:84:in `open'
	from /usr/local/share/gems/gems/rhc-0.95.4/bin/rhc-domain:84:in `create_or_alter_domain'
	from /usr/local/share/gems/gems/rhc-0.95.4/bin/rhc-domain:326:in `<top (required)>'
	from /usr/local/bin/rhc-domain:23:in `load'
	from /usr/local/bin/rhc-domain:23:in `<main>'

Comment 3 John (J5) Palmieri 2012-07-12 17:25:53 UTC
Please try this again with the new release.  A duplicate bug on Linux was fixed and verified.

Comment 4 Jianwei Hou 2012-07-13 04:27:10 UTC
verified on Window7 + rhc-0.95.13 + ruby 1.9.3

1.create domain
2.create applications
3.remove ssh keys under C:\Users\window7\.ssh\
4.alter domain
  rhc domain alter -n w7test1

when altering domain, new ssh keys are generated and domain name is altered successfully.

fixed in rhc-0.95.13


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