openshift / cluster-network-operator

Create and manage cluster networking configuration
Apache License 2.0
97 stars 238 forks source link

Baremetal IPI: can't download image via proxy #1105

Closed derekhiggins closed 3 years ago

derekhiggins commented 3 years ago

when using a proxy the image-cache container is trying to download the image through a proxy, but using a internal url so instead getting a error. ironic is then writing the contents of this error message to disk as a qcow image

metal3-state.openshift-machine-api needs to be added to no_proxy

From rhcos-48.84.202104271417-0-openstack.x86_64.qcow2 (contains a proxy error message instead of a qcow image)

<p>The following error was encountered while trying to retrieve the URL: <a href="http://metal3-state.openshift-machine-api:6180/images/rhcos-48.84.202104271417-0-openstack.x86_64.qcow2/rhcos-48.84.202104271417-0-openstack.x86_64.qcow2">http://metal3-state.openshift-machine-api:6180/images/rhcos-48.84.202104271417-0-openstack.x86_64.qcow2/rhcos-48.84.202104271417-0-openstack.x86_64.qcow2</a></p>
<pre>Name Error: The domain name does not exist.</pre>

From squid logs 1621432495.708 29 fd00:1101::6ef0:c42d:33f4:c2f TCP_MISS/503 4587 GET http://metal3-state.openshift-machine-api:6180/images/rhcos-47.83.202103251640-0-openstack.x86_64.qcow2/rhcos-47.83.202103251640-0-openstack.x86_64.qcow2 - HIER_NONE/- text/html and the metal3-machine-os-downloader container in the image-cache pod

    env:                                                      
    - name: RHCOS_IMAGE_URL                       
      value: http://metal3-state.openshift-machine-api:6180/images/rhcos-48.84.202104271417-0-openstack.x86_64.qcow2/rhcos-48.84.202104271417-0-openstack.x86_64.qcow2
    - name: HTTP_PROXY                        
      value: http://[fd00:1101::1]:3128
    - name: HTTPS_PROXY               
      value: http://[fd00:1101::1]:3128         
    - name: NO_PROXY  
      value: .cluster.local,.svc,127.0.0.1,9999,api-int.ostest.test.metalkube.org,fd00:1101::/64,fd01::/48,fd02::/112,fd2e:6f44:5dd8:c956::/120,localhost
zaneb commented 3 years ago

Isn't the bigger issue here that the proxy is not using the same rules as the internal DNS resolver w.r.t. search domains?