Bug 1062655 - regression: creating app --from-code does not give clear error message if the URL is wrong
Summary: regression: creating app --from-code does not give clear error message if the...
Keywords:
Status: CLOSED ERRATA
Alias: None
Product: OpenShift Container Platform
Classification: Red Hat
Component: Containers
Version: 2.0.0
Hardware: Unspecified
OS: Unspecified
high
medium
Target Milestone: ---
: ---
Assignee: Brenton Leanhardt
QA Contact: libra bugs
URL:
Whiteboard:
: 1066283 (view as bug list)
Depends On:
Blocks:
TreeView+ depends on / blocked
 
Reported: 2014-02-07 15:44 UTC by Luke Meyer
Modified: 2017-03-08 17:38 UTC (History)
3 users (show)

Fixed In Version:
Doc Type: Bug Fix
Doc Text:
Clone Of:
Environment:
Last Closed: 2014-05-15 14:40:40 UTC
Target Upstream Version:
Embargoed:


Attachments (Terms of Use)

Description Luke Meyer 2014-02-07 15:44:47 UTC
Description of problem:
When I create an app and specify the template with --from-code <url>, the URL specified is for cloning the app's git repository at creation time. If cloning fails for some reason, the error message should be clear. It's not.

Version-Release number of selected component (if applicable):
As far as I can tell, for OSE 1.2 and 2.0.0, the message was correct. I suspect with 2.0.1 or 2.0.2, that changed.

Steps to Reproduce:
1. Against a recent OSE 2.0 install, do "rhc app create foo php --from-code http://example.com/foo.git"

Actual results:
Unable to complete the requested operation due to: An invalid exit code (131) was returned from the server broker.ose203.example.com.  This indicates an unexpected problem during the execution of your request..

Expected results:
Source code repository could not be cloned: 'http://example.com/foo.git'. Please verify the repository is correct and contact support.

Additional info:
Basically, it's a node execution error, and there's not a lot about what actually went wrong in the node logs, so this would be kind of hard to track down. You do get something like this in /var/log/openshift/node/platform-trace.log:

February 07 08:39:52 INFO oo_spawn running \
set -xe;
git clone --bare --no-hardlinks 'http://example.com/foo.git' foo.git;
GIT_DIR=./foo.git git config core.logAllRefUpdates true;

GIT_DIR=./foo.git git repack;
: {:unsetenv_others=>false, :close_others=>true, :in=>"/dev/null", :chdir=>"/var/lib/openshift/52f4fe3d3eefa9d3870000f4/git", :out=>#<IO:fd 10>, :err=>#<IO:fd 8>}
February 07 08:39:52 INFO oo_spawn buffer(6/) + git clone --bare --no-hardlinks http://example.com/foo.git foo.git

February 07 08:39:52 INFO oo_spawn buffer(9/) Initialized empty Git repository in /var/lib/openshift/52f4fe3d3eefa9d3870000f4/git/foo.git/

February 07 08:39:52 INFO oo_spawn buffer(6/) fatal: http://example.com/foo.git/info/refs not found: did you run git update-server-info on the server?

Comment 2 Nan Wei 2014-02-08 08:33:55 UTC
*** Bug 1062844 has been marked as a duplicate of this bug. ***

Comment 3 Luke Meyer 2014-02-11 14:38:39 UTC
It's not clear to me whether the fix in bug 1062844 should fix this bug as well, but it does seem likely. Please test with that fix in place. If it's fixed, we can mark this bug a duplicate, otherwise we still need to pursue it.

Comment 4 Nan Wei 2014-02-12 02:33:10 UTC
Openshift enterprise: 2014-02-10.2

[root@broker ~]# rhc app create foo php --from-code http://example.com/foo.git
Using php-5.3 (PHP 5.3) for 'php'

Application Options
-------------------
  Domain:      nweidomain
  Cartridges:  php-5.3
  Source Code: http://example.com/foo.git
  Gear Size:   default
  Scaling:     no

Creating application 'foo' ... 
Unable to complete the requested operation due to: An invalid exit code (131) was returned from the server broker.gpei-0206.com.cn.
This indicates an unexpected problem during the execution of your request..
Reference ID: 92b4ecbcfd414eeafcd0e11ad153678e

this bug is different from bug 1062844, so assigned.

Comment 5 Luke Meyer 2014-02-18 16:48:47 UTC
*** Bug 1066283 has been marked as a duplicate of this bug. ***

Comment 6 Luke Meyer 2014-03-25 14:58:08 UTC
With the 2.1 rebase, expect this to be fixed. I don't think we'll try to backport to 2.0.

Comment 7 Nan Wei 2014-03-26 02:21:39 UTC
Openshift enterprise: 2.1/2014-03-24.2

[nwei@broker ~]$ rhc app create foo php-5.3 --from-code http://example.com/foo.git
Application Options
-------------------
Domain:      nweidomain
Cartridges:  php-5.3
Source Code: http://example.com/foo.git
Gear Size:   default
Scaling:     no

Creating application 'foo' ... 
Source code repository could not be cloned: 'http://example.com/foo.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.