Bug 1948538 - [OCP 4.7] get-resources.sh doesn't honor the no_proxy settings
Summary: [OCP 4.7] get-resources.sh doesn't honor the no_proxy settings
Keywords:
Status: CLOSED ERRATA
Alias: None
Product: OpenShift Container Platform
Classification: Red Hat
Component: Bare Metal Hardware Provisioning
Version: 4.7
Hardware: Unspecified
OS: Unspecified
low
low
Target Milestone: ---
: 4.7.z
Assignee: Riccardo Pittau
QA Contact: Silvia Serafini
URL:
Whiteboard:
Depends On: 1948513
Blocks: 1963212
TreeView+ depends on / blocked
 
Reported: 2021-04-12 11:56 UTC by OpenShift BugZilla Robot
Modified: 2022-07-14 04:47 UTC (History)
3 users (show)

Fixed In Version:
Doc Type: If docs needed, set a value
Doc Text:
Clone Of:
Environment:
Last Closed: 2022-07-14 04:47:33 UTC
Target Upstream Version:
Embargoed:


Attachments (Terms of Use)


Links
System ID Private Priority Status Summary Last Updated
Github openshift ironic-rhcos-downloader pull 77 0 None open Bug 1948538: Clear proxy env variables if go would have 2022-06-24 06:47:01 UTC
Red Hat Product Errata RHBA-2022:5505 0 None None None 2022-07-14 04:47:57 UTC

Description OpenShift BugZilla Robot 2021-04-12 11:56:06 UTC
+++ This bug was initially created as a clone of Bug #1948513 +++

Description of problem:

In proxy environments, it is always needed to use the http_proxy, https_proxy and the no_proxy variable, otherwise if you want to reach internal resources you will be using the proxy which may not work.

The get-resources.sh script doesn't contain the no_proxy var.


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


How reproducible:
Deploy a cluster with proxy settings and serving the ipa and rhcos images in a local http server with no proxy in the middle

Steps to Reproduce:
1.
2.
3.

Actual results:
The script tries to curl the images using the proxy and times out

Expected results:
The script is aware of the no_proxy variable and it downloads the images properly

Additional info:
https://github.com/metal3-io/ironic-ipa-downloader/pull/18
https://github.com/openshift/ironic-ipa-downloader/pull/65
https://github.com/openshift/ironic-rhcos-downloader/pull/39

Comment 1 Victor Voronkov 2021-06-15 05:46:48 UTC
Original https://bugzilla.redhat.com/show_bug.cgi?id=1948513 was verified, please proceed with backport

Comment 8 Silvia Serafini 2022-06-28 20:13:36 UTC
Verified on 4.7.0-0.nightly-2022-06-28-080058, cluster deployed with proxy.

[kni@provisionhost-0-0 ~]$ oc get clusterversion
NAME      VERSION                             AVAILABLE   PROGRESSING   SINCE   STATUS
version   4.7.0-0.nightly-2022-06-28-080058   True        False         74m     Cluster version is 4.7.0-0.nightly-2022-06-28-080058

[kni@provisionhost-0-0 ~]$  grep proxy install-config.yaml -A3
proxy:
  httpProxy: http://192.168.123.96:3128
  httpsProxy: http://192.168.123.96:3128
  noProxy: registry.ocp-edge-cluster-0.qe.lab.redhat.com,172.22.0.0/24,192.168.123.0/24,9999

[kni@provisionhost-0-0 ~]$ sudo podman ps -a
CONTAINER ID  IMAGE                     COMMAND  CREATED      STATUS          PORTS   NAMES
666cd734486a  sameersbn/squid:3.5.27-2           3 hours ago  Up 3 hours ago          squid-edge

[kni@provisionhost-0-0 ~]$  oc logs metal3-777c64bcbc-kh9nv  -n openshift-machine-api -c metal3-machine-os-downloader | grep "unset HTTP_PROXY" -B2
+ cd /shared/tmp/tmp.hHaYPCSpt2
+ clearproxy http://registry.ocp-edge-cluster-0.qe.lab.redhat.com:8080/images/rhcos-47.84.202206131038-0-openstack.x86_64.qcow2.gz
+ unset HTTP_PROXY http_proxy HTTPS_PROXY https_proxy

Comment 11 errata-xmlrpc 2022-07-14 04:47:33 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 (OpenShift Container Platform 4.7.54 bug fix update), 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-2022:5505


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