Bug 1488283

Summary: "oc new-app" doesn't respect git proxy for implicit git process
Product: OpenShift Container Platform Reporter: Takayoshi Tanaka <tatanaka>
Component: ocAssignee: Corey Daley <cdaley>
Status: CLOSED ERRATA QA Contact: Wenjing Zheng <wzheng>
Severity: medium Docs Contact:
Priority: unspecified    
Version: 3.6.1CC: aos-bugs, bparees, jokerman, jvallejo, mmccomas, wewang, wzheng
Target Milestone: ---   
Target Release: 3.7.0   
Hardware: Unspecified   
OS: Unspecified   
Whiteboard:
Fixed In Version: Doc Type: Bug Fix
Doc Text:
Cause: git clone was being run without a timeout Consequence: oc new-app was timing out Fix: oc new-app now uses git ls-remote with a timeout Result: oc new-app command will not time out
Story Points: ---
Clone Of: Environment:
Last Closed: 2017-11-28 22:09:17 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 Takayoshi Tanaka 2017-09-05 02:58:12 UTC
Description of problem:
When a user is under proxy environment, oc new-app command hangs when new-app command launches an implicit git process.

Version-Release number of selected component (if applicable):


How reproducible:
Always under proxy environment

Steps to Reproduce:
1. Execute new-app command under proxy environment. Assuming git proxy has configured correctly.
$ oc new-app --name='grafana' --strategy='docker' https://github.com/bacek/openshift-prometheus.git

Actual results:
new-app commands hanged and timeouted. However, the app created after a timeout.

Expected results:
The app creates without a timeout.

Additional info:
This is because "oc new-app" commands launched an implicit git process to clone the repository. This implicit git process is executed to look into the repository.

To workaround this issue, specify more command options to avoid launching implicit process. For the above command, this command works.

$ oc new-app --name=grafana --strategy=docker grafana/grafana:4.2.0~https://github.com/bacek/openshift-prometheus.git

Comment 1 Ben Parees 2017-09-05 15:35:49 UTC
Guessing this is when we run git w/o the user's config to test if the repo is private or not.  (When we run git normally, we use the user's config which should have any necessary proxy config in it).

The right answer here is probably to copy the user's gitconfig and only remove the auth content, so we keep any proxy settings, when we are doing the "is this a private repo" check.

Comment 2 Corey Daley 2017-09-07 20:52:33 UTC
Pull request https://github.com/openshift/origin/pull/16187 has been submitted to resolve this issue.

Comment 3 Corey Daley 2017-09-12 15:10:03 UTC
pull request has merged.

Comment 8 errata-xmlrpc 2017-11-28 22:09:17 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://access.redhat.com/errata/RHSA-2017:3188