Red Hat Bugzilla – Bug 842599
rhc alter domain command should not check ssh key
Last modified: 2015-05-14 22:01:01 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):
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
[root@localhost mytest]# rhc domain alter -n qgong18
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
root@localhost mytest]# rhcappcre -a qphp -t php-5.3
Creating application: qphp in qgong17
Response from server:
Exit Code: 0
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://firstname.lastname@example.org/~/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
The alter domain should upload the new key , then we could create app success.
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.
As design has been changed, change it to ON_QA to verify it.
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.
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.
Update the verified build version :
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'