This service will be undergoing maintenance at 00:00 UTC, 2017-10-23 It is expected to last about 30 minutes
Bug 1293281 - [platformmanagement_public_510]Import image from external registry can't use the proxy from env
[platformmanagement_public_510]Import image from external registry can't use ...
Status: CLOSED CURRENTRELEASE
Product: OpenShift Origin
Classification: Red Hat
Component: Image Registry (Show other bugs)
3.x
Unspecified Unspecified
medium Severity medium
: ---
: ---
Assigned To: Akram Ben Aissi
Wei Sun
:
Depends On:
Blocks:
  Show dependency treegraph
 
Reported: 2015-12-21 05:24 EST by zhou ying
Modified: 2016-05-12 13:13 EDT (History)
3 users (show)

See Also:
Fixed In Version:
Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of:
Environment:
Last Closed: 2016-05-12 13:13:14 EDT
Type: Bug
Regression: ---
Mount Type: ---
Documentation: ---
CRM:
Verified Versions:
Category: ---
oVirt Team: ---
RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: ---


Attachments (Terms of Use)

  None (edit)
Description zhou ying 2015-12-21 05:24:05 EST
Description of problem:
On master, set envionment variables to use http_proxy\https_proxy, then import image from docker hub, but the packets still directly from docker hub, not use the http proxy.

Version-Release number of selected component (if applicable):
openshift v1.1-586-gb504019
kubernetes v1.1.0-origin-1107-g4c8e6f4
etcd 2.1.2

How reproducible:
Always

Steps to Reproduce:
1. Start openshift;
2. Set envionment variables to use http_proxy\https_proxy;
     `export  HTTP_PROXY=http://ip:port`
     `export HTTPS_PROXY=http://ip:port`
3. Use command 'tcpdump' to prepare to  capture packets;
4. Use json file to create image stream then import the image from docker hub:
{
    "kind": "ImageStream",
    "apiVersion": "v1",
    "metadata": {
      "name": "python",
      "creationTimestamp": null
    },
    "spec": {
      "dockerImageRepository": "wsun/python-33-centos"
      }
}



Actual results:
4. When import image, from the tcpdump result the packets directly from docker hub not use the http proxy.

Expected results:
4. When import image, should use the http proxy, and the packets should from http proxy's ip and port.

Additional info:
Comment 1 Akram Ben Aissi 2015-12-22 10:30:30 EST
OpenShift master image import feature will is supposed to proxy image streams living in external docker registry and not the default ones (including docker hub registry).

It is required to define a dockerImageRepository running on a custom repository.
Comment 2 jawed 2016-01-04 04:32:02 EST
Please note that the card is dealing with using the proxy setted on the master and reuse this proxy settings to allow import images.
To set the proxy on the master, please refer to this https://docs.openshift.com/enterprise/3.0/admin_guide/http_proxies.html
Comment 3 zhou ying 2016-01-12 05:09:47 EST
Hi Akram:
  Now, I'm confused unsecured registry like : 172.18.8.63:5000/busybox, when no proxy set, the openshift will hang when import-image, and there were logs :
E0112 04:01:29.697238    2213 factory.go:49] error checking for V2 registry at https://172.18.8.63:5000/v2/: Get https://172.18.8.63:5000/v2/: EOF

After use the HTTP_PROXY, the import-image still hang, and there were logs:
E0112 04:37:57.804264    4949 factory.go:49] error checking for V2 registry at https://172.18.8.63:5000/v2/: Get https://172.18.8.63:5000/v2/: Forbidden
Comment 5 zhou ying 2016-01-13 00:11:01 EST
Confirmed on ami devenv-rhel7_3131, follow doc to set the proxy on the master works well, both the http_proxy and https_proxy.

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