Bug 842599

Summary: rhc alter domain command should not check ssh key
Product: OKD Reporter: Rony Gong 🔥 <qgong>
Component: ocAssignee: Clayton Coleman <ccoleman>
Status: CLOSED CURRENTRELEASE QA Contact: libra bugs <libra-bugs>
Severity: low Docs Contact:
Priority: medium    
Version: 2.xCC: jinzhang, rmillner, xtian
Target Milestone: ---Keywords: Triaged
Target Release: ---   
Hardware: Unspecified   
OS: Unspecified   
Whiteboard:
Fixed In Version: Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of: Environment:
Last Closed: 2012-09-17 21:28:48 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 Rony Gong 🔥 2012-07-24 09:24:39 UTC
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
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.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 10:27:39 UTC
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 05:26:48 UTC
As design has been changed, change it to ON_QA to verify it.

Comment 3 joycezhang 2012-08-14 05:27:43 UTC
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 05:29:19 UTC
Update the verified build version :
rhc-0.97.5.gem
int.openshift.redhat.com

Comment 5 joycezhang 2012-08-14 05:35:44 UTC
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!