Bug 842599 - rhc alter domain command should not check ssh key
rhc alter domain command should not check ssh key
Status: CLOSED CURRENTRELEASE
Product: OpenShift Origin
Classification: Red Hat
Component: Command Line Interface (Show other bugs)
2.x
Unspecified Unspecified
medium Severity low
: ---
: ---
Assigned To: Clayton Coleman
libra bugs
: Triaged
Depends On:
Blocks:
  Show dependency treegraph
 
Reported: 2012-07-24 05:24 EDT by Rony Gong
Modified: 2015-05-14 22:01 EDT (History)
3 users (show)

See Also:
Fixed In Version:
Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of:
Environment:
Last Closed: 2012-09-17 17:28:48 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 Rony Gong 2012-07-24 05:24:39 EDT
Description of problem:
The alter domain command should include action: upload ssh key, same as create domain.


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

How reproducible:
always


Steps to Reproduce:
1.create a domain
2.use ssh-keygen to overwrite the default ~/.ssh/id_rsa*
3.use command: rhc domain alter, alter success.
4.create app in the new domain
  
Actual results:
[root@localhost mytest]# rhc domain alter -n qgong18
Password: 

OpenShift key found at /root/.ssh/id_rsa.  Reusing...
Now your new domain name(s) are being propagated worldwide (this might take a minute)...
You can use 'rhc domain show' to view any url changes.  Be sure to update any links
including the url in your local git config: <local_git_repo>/.git/config
Alteration successful.





root@localhost mytest]# rhcappcre -a qphp -t php-5.3
Submitting form:
rhlogin: qgong00@redhat.com
debug: true
Contacting https://ec2-72-44-44-80.compute-1.amazonaws.com
Creating application: qphp in qgong17
Contacting https://ec2-72-44-44-80.compute-1.amazonaws.com
Response from server:
DEBUG:


Exit Code: 0
broker_c: namespacerhloginsshapp_uuiddebugaltercartridgecart_typeactionapp_nameapi
api_c: placeholder
API version:    1.1.3
DEBUG: 'qphp' creation returned success.
Now your new domain name is being propagated worldwide (this might take a minute)...
Pulling new repo down
git clone --quiet ssh://51ed5d8d1abf4c5c81c979f1214ade4a@qphp-qgong17.dev.rhcloud.com/~/git/qphp.git/ qphp
Warning: Permanently added 'qphp-qgong17.dev.rhcloud.com' (RSA) to the list of known hosts.
Permission denied (publickey,gssapi-keyex,gssapi-with-mic).
fatal: The remote end hung up unexpectedly
Error in git clone
Initialized empty Git repository in /root/mytest/qphp/.git/
Cleaning up application
Contacting https://ec2-72-44-44-80.compute-1.amazonaws.com



Expected results:
The alter domain should upload the new key , then we could create app success.


Additional info:
Comment 1 Xiaoli Tian 2012-07-24 06:27:39 EDT
Prefer not check ssh key while altering domain, let rhc sshkey do adding or updating ssh key related things,  and remove this line "OpenShift key found at /root/.ssh/id_rsa.  Reusing.." since it will not compare the ssh key in the client with the server side ssh key.
Comment 2 joycezhang 2012-08-14 01:26:48 EDT
As design has been changed, change it to ON_QA to verify it.
Comment 3 joycezhang 2012-08-14 01:27:43 EDT
As the design has been changed, alter domain won't change and update sshkey with the latest version. We can use "rhc sshkey add" to update sshkey.

Please refer to follow steps:
1.Create a domain
2.Use ssh-keygen to overwrite the default ~/.ssh/id_rsa*
3.Add new sshkey to domain:
#rhc sshkey add -i keyname -k ~/.ssh/id_rsa.pub -p redhat
4.Check the generated local key can match with the updated key in server.

Actual results:
The generated key has been updated to server and can match with the local key. The app can be created successfully without the "Permission denied" problem again.

So mark it as Verified. Thanks.
Comment 4 joycezhang 2012-08-14 01:29:19 EDT
Update the verified build version :
rhc-0.97.5.gem
int.openshift.redhat.com
Comment 5 joycezhang 2012-08-14 01:35:44 EDT
Here's the message when updating domain for the reference, it won't check sshkey by this command.

# rhc domain update -n test9 -p redhat

Updating domain 'test7' to namespace 'test9'

RESULT:
  Success!

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