Bug 1154344 - "rhc app create" cannot use from-code option with SSH protocol like "--from-code=git:openshift/xxx.git"
Summary: "rhc app create" cannot use from-code option with SSH protocol like "--from-c...
Keywords:
Status: CLOSED ERRATA
Alias: None
Product: OpenShift Container Platform
Classification: Red Hat
Component: oc
Version: 2.1.0
Hardware: All
OS: All
urgent
high
Target Milestone: ---
: ---
Assignee: John W. Lamb
QA Contact: libra bugs
URL:
Whiteboard:
Depends On: 1163964
Blocks:
TreeView+ depends on / blocked
 
Reported: 2014-10-19 03:07 UTC by Kenjiro Nakayama
Modified: 2015-01-08 15:34 UTC (History)
9 users (show)

Fixed In Version: rubygem-openshift-origin-node-1.33.1.1-1
Doc Type: Known Issue
Doc Text:
Cause: A node's root user must have SSH keys in place in order to clone an application from a GIT repo over SSH. It's not common for users who are deploying applications to have the ability to deploy SSH keys to the root user. Consequence: Cloning applications over SSH is not supported. Workaround (if any): None. Result: An appropriate error message is now provided indicating the user should clone over a non SSH protocol.
Clone Of:
: 1163964 (view as bug list)
Environment:
Last Closed: 2015-01-08 15:34:16 UTC
Target Upstream Version:
Embargoed:


Attachments (Terms of Use)


Links
System ID Private Priority Status Summary Last Updated
Red Hat Product Errata RHBA-2015:0019 0 normal SHIPPED_LIVE Red Hat OpenShift Enterprise 2.2.3 bug fix and enhancement update 2015-01-08 20:33:24 UTC

Description Kenjiro Nakayama 2014-10-19 03:07:30 UTC
Description of problem:
===
When I try to use --from-code option with ssh protocol, I get forllowing error.

  knakayam@localhost:~$ rhc app create kitchensink jbossas-7 mysql-5.5 -g small --from-code=git:openshift/kitchensink-example.git
  Application Options
  -------------------
  Domain:      kenjiro
  Cartridges:  jbossas-7, mysql-5.5
  Source Code: git:openshift/kitchensink-example.git
  Gear Size:   small
  Scaling:     no
   
  Creating application 'kitchensink' ... 
  Source code repository could not be cloned:
  'git:openshift/kitchensink-example.git'. Please verify the repository
  is correct and try a non-SSH URL such as HTTP.


Version-Release number of selected component (if applicable):
===
Tested for OSE2.1.4 and OpenShift Online with ..
  [root@vm ~]# rhc --version
  rhc 1.24.3.1
  knakayam@localhost:~$ rhc --version
  rhc 1.19.5


How reproducible:
===

Steps to Reproduce:
1. Test below with OpenShift Online
  $ rhc app create kitchensink jbossas-7 mysql-5.5 -g small --from-code=git:openshift/kitchensink-example.git

2. I have already uploaded SSH pubkey on github, I can git clone.
  $ git clone git:openshift/kitchensink-example.git

3. Also we can create with git protocol like below.
  $ rhc app create kitchensink jbossas-7 --from-code git://github.com/openshift/kitchensink-example.git

Actual results:
(Please seee ${Description of problem})

Expected results:
We need to spcify SSH protocol for --from-code. We cannot use other protocols except SSH on some environment.

Comment 3 Jhon Honce 2014-10-21 15:01:06 UTC
git SSH protocol is supported by the from-code, see below. When this has come up in the past it is some networking device/firewall blocking outbound SSH connections.

The error message includes the hint to use http/s as those alternative protocols may be open.


$rhc app create kitchensink jbossas-7 mysql-5.5 -g small --from-code=git:openshift/kitchensink-example.git
Application Options
-------------------
Domain:      honcenet
Cartridges:  jbossas-7, mysql-5.5
Source Code: git:openshift/kitchensink-example.git
Gear Size:   small
Scaling:     no

Creating application 'kitchensink' ... Artifact: ./ROOT.war is still deploying
done

  MySQL 5.5 database added.  Please make note of these credentials:

       Root User: admini4bU98q
   Root Password: PxX7ztf-FKAw
   Database Name: kitchensink

Connection URL: mysql://$OPENSHIFT_MYSQL_DB_HOST:$OPENSHIFT_MYSQL_DB_PORT/

You can manage your new MySQL database by also embedding phpmyadmin.
The phpmyadmin username and password will be the same as the MySQL credentials above.

Waiting for your DNS name to be available ... done

Cloning into 'kitchensink'...
Warning: Permanently added 'kitchensink-honcenet.dev.rhcloud.com,10.142.185.137' (RSA) to the list of known hosts.

Your application 'kitchensink' is now available.

  URL:        http://kitchensink-honcenet.dev.rhcloud.com/
  SSH to:     5446ac2a3166c817a0000001.rhcloud.com
  Git remote: ssh://5446ac2a3166c817a0000001.rhcloud.com/~/git/kitchensink.git/
  Cloned to:  /root/kitchensink

Run 'rhc show-app kitchensink' for more details about your app.

Comment 4 Kenjiro Nakayama 2014-10-22 02:37:27 UTC
I tested on my several different environment, but --from-code with SSH protocol is always failed.

I am sure I can git clone with SSH protocol like this.

  $ git clone git:openshift/kitchensink-example.git
  Cloning into 'kitchensink-example'...
  remote: Counting objects: 140, done.
  remote: Total 140 (delta 0), reused 0 (delta 0)
  Receiving objects: 100% (140/140), 87.17 KiB | 66.00 KiB/s, done.
  Resolving deltas: 100% (29/29), done.
  Checking connectivity... done.

Also I tested for my OSE environment and could see "Host key verification failed." error in /var/log/openshift/node/platform-trace.log.

So, although I think my comment#1 is not wrong, I will wait for QA.

Thanks for your comment, Jhon.

Comment 16 Anping Li 2014-12-09 06:15:25 UTC
Verified and pass on puddle-2-2-2014-12-08

Currently, rhc provide meanfull message when use from-code option with SSH protocol 

[anli@dhcp-129-213 ~]$ rhc app create python2 python-2.6 --from-code=git:openshift/flask-example.git
Application Options
-------------------
Domain:      hanli1dom
Cartridges:  python-2.6
Source Code: git:openshift/flask-example.git
Gear Size:   default
Scaling:     no

Creating application 'python2' ... 
Source code repository could not be cloned:
'git:openshift/flask-example.git'. Git clone using SSH requires the
OpenShift server to authenticate to the repository. Please verify the repository
is correct, and try a non-SSH URL such as HTTPS.

Comment 18 errata-xmlrpc 2015-01-08 15:34:16 UTC
Since the problem described in this bug report should be
resolved in a recent advisory, it has been closed with a
resolution of ERRATA.

For information on the advisory, and where to find the updated
files, follow the link below.

If the solution does not work for you, open a new bug report.

https://rhn.redhat.com/errata/RHBA-2015-0019.html


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