Bug 1235129
| Summary: | [behind proxy]`osc start-build` doesn't work under http(s) proxy | ||
|---|---|---|---|
| Product: | OpenShift Container Platform | Reporter: | Kenjiro Nakayama <knakayam> |
| Component: | Build | Assignee: | Ben Parees <bparees> |
| Status: | CLOSED ERRATA | QA Contact: | Gaoyun Pei <gpei> |
| Severity: | unspecified | Docs Contact: | |
| Priority: | unspecified | ||
| Version: | 3.0.0 | CC: | jialiu, libra-bugs, pep, pruan, wzheng |
| Target Milestone: | --- | ||
| Target Release: | --- | ||
| Hardware: | Unspecified | ||
| OS: | Unspecified | ||
| Whiteboard: | |||
| Fixed In Version: | openshift-3.0.0.1-1.git.4.eab4c86.el7ose | Doc Type: | Bug Fix |
| Doc Text: |
Cause: Proxy environment variables were not propagated to builders.
Consequence: Environments that require an HTTP(s) proxy could not clone external Git repositories.
Fix: Proxy settings are now propagated to all build components.
Result: Environments that require an HTTP(s) proxy now clone Git repositories properly. For details on how to configure builds to use proxies see https://docs.openshift.org/latest/dev_guide/builds.html#using-a-proxy-for-git-cloning
|
Story Points: | --- |
| Clone Of: | Environment: | ||
| Last Closed: | 2015-07-06 21:00:04 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
Kenjiro Nakayama
2015-06-24 05:47:13 UTC
Test on Beijing env which was blocked from rubygems.org Start build without setting http(s) proxy env value in sourceStrategy, and the build was failed for couldn't connect to https://rubygems.org/ Add proxy env to "sourceStrategy" of the buildconfig, start build again. The build was finished successfully. Move the bug to verified. Ignore comment 4, the verification step is incorrect. Seem like the PR is not merged into OSE yet. # rpm -q openshift openshift-3.0.0.1-1.git.0.80e3787.el7ose.x86_64 # oc new-app https://github.com/openshift/simple-openshift-sinatra-sti.git -i openshift/ruby # oc edit bc simple-openshift-sinatra-sti <--snip--> strategy: sourceStrategy: env: - name: HTTP_PROXY value: xx.xx.xx.xx:3128 - name: http_proxy value: xx.xx.xx.xx:3128 - name: HTTPS_PROXY value: xx.xx.xx.xx:3128 - name: https_proxy value: xx.xx.xx.xx:3128 from: <--snip--> # oc build-logs simple-openshift-sinatra-sti-2 E0629 11:18:37.112982 1 git.go:102] fatal: unable to access 'https://github.com/openshift/simple-openshift-sinatra-sti.git/': Failed connect to github.com:443; No route to host F0629 11:18:37.117151 1 builder.go:70] Build error: exit status 128 merged to OSE now (thanks scott) https://github.com/openshift/ose/pull/44 The env variable will not be present in the container because it gets explicitly set/unset during the process. please run with loglevel 5 so we can see if these messages appear in the build log output: https://github.com/openshift/ose/blob/enterprise-3.0/pkg/build/builder/sti.go#L88-L103 Note that this change is in the origin-sti-builder image itself, so I wonder if your run did not pick up the right image? @Ben, Cool, it works now. Thanks for your help.
Verified this bug with openshift-3.0.0.1-1.git.4.eab4c86.el7ose.x86_64 and ose-sti-builder(22a62f8d0d5f) image, PASS.
# oc edit bc
<--snip-->
source:
git:
httpsProxy: xx.xx.xx.xx:3128
uri: https://github.com/openshift/simple-openshift-sinatra-sti.git
type: Git
<--snip-->
strategy:
sourceStrategy:
env:
- name: HTTP_PROXY
value: xx.xx.xx.xx:3128
from:
<--snip-->
# oc start-build simple-openshift-sinatra-sti
# oc build-logs simple-openshift-sinatra-sti-5
<--snip-->
I0630 11:24:51.167816 1 sti.go:83] Starting S2I build from jialiu/simple-openshift-sinatra-sti-5 BuildConfig ...
I0630 11:24:51.167847 1 sti.go:89] Setting https proxy variables for Git to file.rdu.redhat.com:3128
I0630 11:24:51.167900 1 sti.go:112] Building 172.30.71.210:5000/jialiu/simple-openshift-sinatra-sti
I0630 11:24:51.168505 1 clone.go:26] Cloning into /tmp/sti131565253/upload/src
<--snip-->
I0630 11:27:38.250693 1 sti.go:138] Successfully pushed 172.30.71.210:5000/jialiu/simple-openshift-sinatra-sti
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/RHBA-2015:1209 *** Bug 1243423 has been marked as a duplicate of this bug. *** |