Bug 833759 - failed to generate SSH keys when altering domain
failed to generate SSH keys when altering domain
Status: CLOSED CURRENTRELEASE
Product: OpenShift Origin
Classification: Red Hat
Component: Command Line Interface (Show other bugs)
2.x
Unspecified Windows
medium Severity low
: ---
: ---
Assigned To: John (J5) Palmieri
libra bugs
: Triaged
Depends On:
Blocks:
  Show dependency treegraph
 
Reported: 2012-06-20 06:14 EDT by Jianwei Hou
Modified: 2015-05-14 21:58 EDT (History)
3 users (show)

See Also:
Fixed In Version:
Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of:
Environment:
Last Closed: 2012-07-13 19:43:19 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 Jianwei Hou 2012-06-20 06:14:07 EDT
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 11:52:36 EDT
The error message should be instructing the user to use 'rhc setup' instead of 'rhc domain create'.
Comment 2 joycezhang 2012-06-27 05:27:46 EDT
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@redhat.com
2.Change the ssh key by removing ~/.ssh/libra_id_rsa.pub
3.Alter domain name and ssh key for test@redhat.com: rhc domain create -n test2 -l -a test@redhat.com

Additional info:
#rhc domain create -n jinzhang55 -l -a  jinzhang+5@redhat.com
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 13:25:53 EDT
Please try this again with the new release.  A duplicate bug on Linux was fixed and verified.
Comment 4 Jianwei Hou 2012-07-13 00:27:10 EDT
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.