kxr / ocp4_setup_upi_kvm

Script to Setup an OpenShift 4 UPI Cluster on KVM. Based on this guide: https://kxr.me/2019/08/17/openshift-4-upi-install-libvirt-kvm/
52 stars 57 forks source link

fix version check - sed expression needs to change #34

Closed jmazzitelli closed 2 years ago

jmazzitelli commented 2 years ago

I was getting this:

====> Checking if Client URL is downloadable: 

[ERROR] https://mirror.openshift.com/pub/openshift-v4/clients/ocp/4.9.8/                <a href="openshift-client-linux-4.9.8.tar.gz"> not reachable

Issue in .install_scripts/version_check.sh:

CLIENT=$(curl -N --fail -qs "${OCP_MIRROR}/${urldir}/" | grep  -m1 "client-linux" | sed 's/.*href="\(openshift-.*\)">open.*/\1/')

If I execute that command (the curl piped to grep then sed) with the env vars set properly:

export OCP_MIRROR="https://mirror.openshift.com/pub/openshift-v4/clients/ocp"
export urldir="stable"
curl -N --fail -qs "${OCP_MIRROR}/${urldir}/" | grep  -m1 "client-linux" | sed 's/.*href="\(openshift-.*\)">open.*/\1/'

I get this:

                <a href="openshift-client-linux-4.9.13.tar.gz">

sed is trying to extract out the tarball filename but sed isn't doing what is expected - its just returning the full \<a href> element. Not sure what changed in the http response from the mirror, but something must have changed in the past few weeks.

This PR fixes the sed expressions for all tarball requests.

jmazzitelli commented 2 years ago

note that I was also getting this - which is why I changed the two related to rhcos:

====> Checking if Kernel URL is downloadable: 

[ERROR] https://mirror.openshift.com/pub/openshift-v4/dependencies/rhcos/4.9/latest/                <a href="rhcos-4.9.0-x86_64-live-kernel-x86_64"> not reachable