Open juhler64 opened 2 years ago
Note:
I can also wget the file from the location that fails in the script.
How can all DNS checks pass and then not be able to reach Openshift mirror?
Yeah quite strange indeed.
Looking at it closely, the script is failing here. The script is doing a curl --head
to see if the file is downloadable.
Can you try doing a head to see if that is working?
curl -qs --head --fail https://mirror.openshift.com/pub/openshift-v4/clients/ocp/stable/
You should see something like this:
# curl -qs --head --fail https://mirror.openshift.com/pub/openshift-v4/clients/ocp/stable/
HTTP/1.1 200 OK
Content-Type: text/html
Content-Length: 23617
Connection: keep-alive
Server: CloudFront
Date: Sat, 18 Dec 2021 12:59:57 GMT
Cache-Control: max-age=0
X-Cache: LambdaGeneratedResponse from cloudfront
Via: 1.1 f6c241b75ae7d21ac836339454ab90b8.cloudfront.net (CloudFront)
X-Amz-Cf-Pop: FRA50-C1
X-Amz-Cf-Id: wnVn7y5z9mCfMmV_EZCVjS_4HTMdpyWjN2TEAhXU144bEUQG17u4KA==
Sorry I should have added that curl seems to work fine as well.
Last login: Mon Dec 20 09:09:44 2021 [jonu@ocpmain ~]$ curl -qs --head --fail https://mirror.openshift.com/pub/openshift-v4/clients/ocp/stable/ HTTP/2 200 content-type: text/html content-length: 23617 server: CloudFront date: Mon, 20 Dec 2021 14:57:46 GMT cache-control: max-age=0 x-cache: LambdaGeneratedResponse from cloudfront via: 1.1 019240c167e60128b9dbe3d5c782bc6d.cloudfront.net (CloudFront) x-amz-cf-pop: MIA3-C2 x-amz-cf-id: I4rVgv2jNwzrichTrOOiw1d6sXL8MCUBkkHhU3FZ1tlQOSw9mVC-FQ==
I'm in the same situation. some help please
Let's remove the redirector so we see exactly what error curl is throwing. Can you change the line here from:
timeout 10 curl -qs --head --fail "${url}" &> /dev/null && ok || err "${url} not reachable"
to:
timeout 10 curl -qs --head --fail "${url}" && ok || err "${url} not reachable"
and try again.
With that modification in the script, it works fine. Thanks !!
I'll give it a try. Thanks!
Yes this worked for me as well. Thanks.
[root@noida-lab ocp4_setup_upi_kvm]# ./ocp4_setup_upi_kvm.sh --cluster-name ocp4 --ocp-version 4.2.latest --pull-secret ~/openshift/pull-secret.txt
####################################
####################################
====> Checking if we have all the dependencies: ok ====> Checking if the script/working directory already exists: ok ====> Checking for pull-secret (/root/openshift/pull-secret.txt): ok ====> Checking if libvirt is running or enabled: ok ====> Checking if we have any existing leftover VMs: ok ====> Checking if DNS service (dnsmasq or NetworkManager) is active: NetworkManager ====> Checking if dnsmasq is enabled in NetworkManager: ok ====> Testing dnsmasq reload (systemctl reload NetworkManager): ok ====> Testing libvirtd restart (systemctl restart libvirtd): ok ====> Checking for any leftover dnsmasq config: ok ====> Checking for any leftover hosts file: ok ====> Checking for any leftover/conflicting dns records: ok
#######################
#######################
====> Checking libvirt network: using default
##################
##################
====> Checking if first entry in /etc/resolv.conf is pointing locally: ok ====> Creating a test host file for dnsmasq /etc/hosts.dnstest: ok ====> Creating a test dnsmasq config file /etc/NetworkManager/dnsmasq.d/dnstest.conf: ok ====> Reloading libvirt and dnsmasq: .. ok
====> Testing forward dns via @127.0.0.1: ok ====> Testing reverse dns via @127.0.0.1: ok ====> Testing wildcard record via @127.0.0.1: ok
====> Testing forward dns via @192.168.122.1: ok ====> Testing reverse dns via @192.168.122.1: ok ====> Testing wildcard record via @192.168.122.1: ok
====> Testing forward dns via : ok ====> Testing reverse dns via : ok ====> Testing wildcard record via : ok
====> All DNS tests passed. Cleaning up: ... ok
My script is failing here, can someone please help ?
Follow the set up and I get to this point:
##################
DNS CHECK
##################
====> Checking if first entry in /etc/resolv.conf is pointing locally: ok ====> Creating a test host file for dnsmasq /etc/hosts.dnstest: ok ====> Creating a test dnsmasq config file /etc/NetworkManager/dnsmasq.d/dnstest.conf: ok ====> Reloading libvirt and dnsmasq: .. ok
====> Testing forward dns via @127.0.0.1: ok ====> Testing reverse dns via @127.0.0.1: ok ====> Testing wildcard record via @127.0.0.1: ok
====> Testing forward dns via @192.168.122.1: ok ====> Testing reverse dns via @192.168.122.1: ok ====> Testing wildcard record via @192.168.122.1: ok
====> Testing forward dns via : ok ====> Testing reverse dns via : ok ====> Testing wildcard record via : ok
====> All DNS tests passed. Cleaning up: ... ok
##########################################
OPENSHIFT/RHCOS VERSION/URL CHECK
##########################################
====> Looking up OCP4 client for release stable: ====> Checking if Client URL is downloadable:
[ERROR] https://mirror.openshift.com/pub/openshift-v4/clients/ocp/stable/ not reachable
How can all DNS checks pass and then not be able to reach Openshift mirror?
[root@ocpmain ocp4_setup_upi_kvm]# nslookup mirror.openshift.com Server: 127.0.0.1 Address: 127.0.0.1#53
Non-authoritative answer: Name: mirror.openshift.com Address: 13.35.118.52 Name: mirror.openshift.com Address: 13.35.118.46 Name: mirror.openshift.com Address: 13.35.118.26 Name: mirror.openshift.com Address: 13.35.118.14 Name: mirror.openshift.com Address: 2600:9000:2305:4000:17:3d36:19c0:93a1 Name: mirror.openshift.com Address: 2600:9000:2305:1a00:17:3d36:19c0:93a1 Name: mirror.openshift.com Address: 2600:9000:2305:2400:17:3d36:19c0:93a1 Name: mirror.openshift.com Address: 2600:9000:2305:3800:17:3d36:19c0:93a1 Name: mirror.openshift.com Address: 2600:9000:2305:a600:17:3d36:19c0:93a1 Name: mirror.openshift.com Address: 2600:9000:2305:fe00:17:3d36:19c0:93a1 Name: mirror.openshift.com Address: 2600:9000:2305:5c00:17:3d36:19c0:93a1 Name: mirror.openshift.com Address: 2600:9000:2305:800:17:3d36:19c0:93a1