Bug 1488283 - "oc new-app" doesn't respect git proxy for implicit git process
Summary: "oc new-app" doesn't respect git proxy for implicit git process
Keywords:
Status: CLOSED ERRATA
Alias: None
Product: OpenShift Container Platform
Classification: Red Hat
Component: oc
Version: 3.6.1
Hardware: Unspecified
OS: Unspecified
unspecified
medium
Target Milestone: ---
: 3.7.0
Assignee: Corey Daley
QA Contact: Wenjing Zheng
URL:
Whiteboard:
Depends On:
Blocks:
TreeView+ depends on / blocked
 
Reported: 2017-09-05 02:58 UTC by Takayoshi Tanaka
Modified: 2021-06-10 12:57 UTC (History)
7 users (show)

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
Clone Of:
Environment:
Last Closed: 2017-11-28 22:09:17 UTC
Target Upstream Version:
Embargoed:


Attachments (Terms of Use)


Links
System ID Private Priority Status Summary Last Updated
Red Hat Product Errata RHSA-2017:3188 0 normal SHIPPED_LIVE Moderate: Red Hat OpenShift Container Platform 3.7 security, bug, and enhancement update 2017-11-29 02:34:54 UTC

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


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