Closed mcornea closed 5 years ago
It looks like this is caused by the CACHEURL env var which gets set incorrectly:
[root@localhost core]# podman inspect ipa-downloader | grep CACHEURL
"CACHEURL=http://192.168.123.1/images"
## 192.168.123.1 is the router address so curl fails
[root@localhost core]# curl http://192.168.123.1/images/ironic-python-agent.tar.headers
curl: (7) Failed to connect to 192.168.123.1 port 80: Connection refused
## if we use the address of the provision host instead then curl succeeds
[root@localhost core]# curl http://192.168.123.136/images/ironic-python-agent.tar.headers -I
HTTP/1.1 200 OK
Date: Fri, 16 Aug 2019 21:00:39 GMT
Server: Apache/2.4.6 (CentOS)
Last-Modified: Fri, 16 Aug 2019 19:55:32 GMT
ETag: "10b-590415f7cadc7"
Accept-Ranges: bytes
Content-Length: 267
Content-Type: application/x-tar
CACHEURL comes from https://github.com/openshift/installer/blob/master/data/data/bootstrap/baremetal/files/usr/local/bin/startironic.sh.template#L73-L76
and the if conditional where curl is failing from https://github.com/metal3-io/ironic-ipa-downloader/blob/master/get-resource.sh#L19-L21
https://github.com/metal3-io/ironic-ipa-downloader/pull/4 should fix the problem of the cache miss being fatal.
Even on baremetal, the provisioning host might have a cache, I wonder if we can't have better logic for it's location.
OpenShift port: https://github.com/openshift/ironic-ipa-downloader/pull/10
Please reopen if you still see a problem once you test with a version that includes this commit
Even on baremetal, the provisioning host might have a cache, I wonder if we can't have better logic for it's location.
My intention with using the default route was that this should work both in the dev-scripts case, and in the baremetal case where there's a cache on the provisioning host, e.g in both cases it's probable that the default route is pointing to a bridge on the provisioning host where the bootstrap VM is running?
Seems that doesn't work in this case, probably because of MANAGE_BR_BRIDGE=n
I guess?
Open to suggestions on how we can improve the location-guessing in startironic.sh, I was trying to avoid yet-another install-config option, but if necessary we can add one.
Describe the bug
192.168.123.1 is the default router for the external network
To Reproduce I believe this should be reproducible on any baremetal environment.
Expected/observed behavior I expect the ipa-downloader exits successfully
Additional context Add any other context about the problem here, links to related issues etc.