Red Hat Bugzilla – Bug 1293281
[platformmanagement_public_510]Import image from external registry can't use the proxy from env
Last modified: 2016-05-12 13:13:14 EDT
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):
Steps to Reproduce:
1. Start openshift;
2. Set envionment variables to use http_proxy\https_proxy;
3. Use command 'tcpdump' to prepare to capture packets;
4. Use json file to create image stream then import the image from docker hub:
4. When import image, from the tcpdump result the packets directly from docker hub not use the http proxy.
4. When import image, should use the http proxy, and the packets should from http proxy's ip and port.
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.
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
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
Confirmed on ami devenv-rhel7_3131, follow doc to set the proxy on the master works well, both the http_proxy and https_proxy.