Bug 896364 - Unable to create new PHP-5.3 application on production
Summary: Unable to create new PHP-5.3 application on production
Keywords:
Status: CLOSED CURRENTRELEASE
Alias: None
Product: OKD
Classification: Red Hat
Component: Containers
Version: 2.x
Hardware: Unspecified
OS: Unspecified
medium
medium
Target Milestone: ---
: ---
Assignee: Rob Millner
QA Contact: libra bugs
URL:
Whiteboard:
: 829452 (view as bug list)
Depends On:
Blocks:
TreeView+ depends on / blocked
 
Reported: 2013-01-17 06:16 UTC by Clayton Coleman
Modified: 2015-05-14 23:04 UTC (History)
5 users (show)

Fixed In Version:
Doc Type: Bug Fix
Doc Text:
Clone Of:
Environment:
Last Closed: 2013-02-13 23:40:30 UTC
Target Upstream Version:
Embargoed:


Attachments (Terms of Use)
Log from mcollective/broker showing node execution failure (63.62 KB, text/x-log)
2013-01-18 14:25 UTC, Clayton Coleman
no flags Details
Git output on prod. (2.21 KB, application/octet-stream)
2013-01-21 09:50 UTC, Wesley Hearn
no flags Details


Links
System ID Private Priority Status Summary Last Updated
Red Hat Bugzilla 902947 0 low CLOSED Hint to the UI that the problem box is "Source Code" not "Public URL" if configure returns a Source Code error message. 2021-02-22 00:41:40 UTC

Internal Links: 902947

Description Clayton Coleman 2013-01-17 06:16:24 UTC
Attempted to create a new PHP-5.3 app with git URL:

git:smarterclayton/drupal-example.git

Got a site exception, search site logs for reference # def6c9255744c68ebf95bf3ff8718aa8

Comment 1 Mengjiao Gao 2013-01-18 03:05:14 UTC
Tested this issue on devenv_2687, and STG, found that the new PHP-5.3 app can be created successfully both on dev and STG with git URL: https://github.com/smarterclayton/drupal-example.git .

However, the new PHP-5.3 app can only be created successfully on dev with git URL: git:smarterclayton/drupal-example.git , and will get a site exception on STG.

Steps to test as follows:
1. Created a new PHP-5.3 app with git URL: git:smarterclayton/drupal-example.git on devenv_2687.
2. Created a new PHP-5.3 app with git URL: https://github.com/smarterclayton/drupal-example.git on devenv_2687.
3. Created a new PHP-5.3 app with git URL: git:smarterclayton/drupal-example.git on STG.
4. Created a new PHP-5.3 app with git URL: https://github.com/smarterclayton/drupal-example.git on STG.

Actual result:
1. Created successfully.
2. Created successfully.
3. Got site exception.
4. Created successfully.
Expected result:
Both app created at step 1,2,3,4 should be created successfully.

Comment 2 Clayton Coleman 2013-01-18 14:25:56 UTC
Created attachment 682450 [details]
Log from mcollective/broker showing node execution failure

The attached log shows a node execution failure in prod.  Transient possibly?

Comment 3 Rob Millner 2013-01-18 18:32:50 UTC
I think this is the issue (from the mcollective log)...

Cloning git repository from remote 'git:smarterclayton/drupal-example.git'.
Initialized empty Git repository in /var/lib/openshift/20fcbca5a856484ba34143c842682999/git/drupal719.git/
Host key verification failed.
fatal: The remote end hung up unexpectedly

Comment 4 Rob Millner 2013-01-19 01:34:37 UTC
This fails on my devenv.  There's a host key for github, then a host key for my app but there's no line-break between them.  Whatever procedure added the git hub host key has a bug.

Since ssh cloning may have host and authorization key issues; I think we should restrict cloning to just http://, https:// and git:// on app create.

Comment 5 Rob Millner 2013-01-19 01:44:46 UTC
Pristine devenv is fine.  Its just when you ssh from the devenv and a new host key is added that the github host key breaks.

https://github.com/openshift/li/pull/771

Still need to diagnose whether the same issue happened on prod.  Still think we should not allow the ssh git clone method.

Comment 6 Rob Millner 2013-01-19 02:08:39 UTC
Updated the release ticket.

Comment 7 Wesley Hearn 2013-01-21 09:50:25 UTC
Created attachment 684175 [details]
Git output on prod.

This problem does not seem to exist in prod. I have attached the output of me going a git clone on git@gitub then https then doing git@github.

Comment 8 Rob Millner 2013-01-21 18:35:23 UTC
The git clone happens as root as part of the cartridge hooks.  Is it possible to try cloning the git repo as root on all ex nodes on stg and prod?  Thanks!

Comment 9 Rob Millner 2013-01-22 01:22:04 UTC
Feedback from ops is that prod does not carry the keys.

I think given that host key issues can crop up on any ex node based on changes outside our control, and we don't provide a way to include ssh keys anyway for git cloning; we're going to have to exclude ssh based git cloning when creating an app with an external repository.

Users will still be able to create apps with external repositories of the following types:

git://host.xz[:port]/path/to/repo.git/
http[s]://host.xz[:port]/path/to/repo.git/
ftp[s]://host.xz[:port]/path/to/repo.git/
rsync://host.xz/path/to/repo.git/

Comment 10 Rob Millner 2013-01-22 04:57:08 UTC
Restrict URL types and emit useful error messages.

https://github.com/openshift/origin-server/pull/1190

One last piece to fix is how to tell the UI which box to highlight for the error.

Comment 11 Rob Millner 2013-01-22 19:18:26 UTC
Make the strings consistent so that the broker can set the field properly.

https://github.com/openshift/origin-server/pull/1195

An additional bug has been filed to have the broker specify the proper hint to the UI.  Bug 902947.

Comment 12 Rob Millner 2013-01-22 19:54:38 UTC
*** Bug 829452 has been marked as a duplicate of this bug. ***

Comment 14 Mengjiao Gao 2013-01-23 02:54:24 UTC
Retest this issue on  devenv_2709 and INT (same with devenv_2709) with following steps:

1. Created a new PHP-5.3 app with git URL not allowed: git:smarterclayton/drupal-example.git on devenv_2709.
2. Created a new PHP-5.3 app with git URL not valid: ftp://github.com/smarterclayton/drupal-example.git on devenv_2709.
3. Created a new PHP-5.3 app with correct and allowed git URL : https://github.com/smarterclayton/drupal-example.git on devenv_2709.
4. Created a new PHP-5.3 app with git URL: git:smarterclayton/drupal-example.git on INT.
5. Created a new PHP-5.3 app with git URL: https://github.com/smarterclayton/drupal-example.git on INT.

Actual result:

1. Error message :"Source Code repository URL type must be one of: git:// http:// https:// ftp:// ftps:// rsync:// " was shown when created app.
   And the "Public URL" dialogue box is highlighted.

2. Error message :"Unable to clone the remote git repository: 'ftp://github.com/smarterclayton/drupal-example.git'. Please verify the repository is correct and contact support. " was shown when created app.
   And the "Public URL" dialogue box is highlighted.

3.Created successfully.
4. Error message :"Source Code repository URL type must be one of: git:// http:// https:// ftp:// ftps:// rsync:// " was shown when created app.
   And the "Public URL" dialogue box is highlighted.
5.Created successfully.

Expected result:
2.Error message :"Source Code repository could not be cloned: 'ftp://github.com/smarterclayton/drupal-example.git'. Please verify the repository is correct and contact support. " should be shown when created app.
   And the "Source Code" dialogue box should be highlighted.


Will verify this bug when the code in #Comment 3 merged in.

Comment 15 Mengjiao Gao 2013-01-23 08:29:09 UTC
Verify this bug with following steps:

1.Created a new PHP-5.3 app with git URL not valid: ftp://github.com/smarterclayton/drupal-example.git on devenv_2710.
2.Created a new drupal app with git URL not valid: ftp://github.com/smarterclayton/drupal-example.git on devenv_2710.

Actual result:

At step 1,2, both get error message: "Source Code repository could not be cloned: 'ftp://github.com/smarterclayton/drupal-example.git'. Please verify the repository is correct and contact support. "


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