diff --git a/Makefile b/Makefile index ec55e7d6..b595d3fc 100644 --- a/Makefile +++ b/Makefile @@ -366,6 +366,7 @@ nerdctl: KEEPALIVED_DEB_U20 := https://github.com/hnakamur/keepalived-deb/releases/download/debian%2F1%252.1.3-1ubuntu1ppa1-focal/keepalived_2.1.3-1ubuntu1ppa1.focal_amd64.deb KEEPALIVED_DEB_U18 := https://github.com/hnakamur/keepalived-deb/releases/download/debian%2F1%252.1.3-1ubuntu1ppa1-bionic/keepalived_2.1.3-1ubuntu1ppa1.bionic_amd64.deb KEEPALIVED_RPM_CENTOS7 := https://github.com/hnakamur/keepalived-rpm/releases/download/2.1.3-1/keepalived-2.1.3-1.el7.x86_64.rpm +KEEPALIVED_RPM_RHEL86 := https://rpmfind.net/linux/centos/8-stream/AppStream/x86_64/os/Packages/keepalived-2.1.5-9.el8.x86_64.rpm keepalived: echo "Downloading Keepalived packages" @@ -373,6 +374,7 @@ keepalived: curl --output $(COMMON_SRC_ROOT)${KUBERNETES_EXECUTABLES}/keepalived_packages/keepalived_2.1.3-1ubuntu1ppa1.focal_amd64.deb -L ${KEEPALIVED_DEB_U20} curl --output $(COMMON_SRC_ROOT)${KUBERNETES_EXECUTABLES}/keepalived_packages/keepalived_2.1.3-1ubuntu1ppa1.bionic_amd64.deb -L ${KEEPALIVED_DEB_U18} curl --output $(COMMON_SRC_ROOT)${KUBERNETES_EXECUTABLES}/keepalived_packages/keepalived-2.1.3-1.el7.x86_64.rpm -L ${KEEPALIVED_RPM_CENTOS7} + curl --output $(COMMON_SRC_ROOT)${KUBERNETES_EXECUTABLES}/keepalived_packages/keepalived-2.1.5-9.el8.x86_64.rpm -L ${KEEPALIVED_RPM_RHEL86} # Download Ubuntu 18.04 dependency packages as well curl --output $(COMMON_SRC_ROOT)${KUBERNETES_EXECUTABLES}/keepalived_packages/libjansson4_2.11-1_amd64.deb -L http://archive.ubuntu.com/ubuntu/pool/main/j/jansson/libjansson4_2.11-1_amd64.deb curl --output $(COMMON_SRC_ROOT)${KUBERNETES_EXECUTABLES}/keepalived_packages/libnftnl7_1.0.9-2_amd64.deb -L http://archive.ubuntu.com/ubuntu/pool/universe/libn/libnftnl/libnftnl7_1.0.9-2_amd64.deb @@ -534,7 +536,7 @@ virtctl: -include $(ROOT_DIR)/ip_type/Makefile -include $(ROOT_DIR)/addr_conv/Makefile -jq: +jq: echo "Downloading jq" cd ${KUBERNETES_DIR} && \ ${WGET_CMD} -O jq -L https://github.com/stedolan/jq/releases/download/jq-1.6/jq-linux64 && \ @@ -790,4 +792,3 @@ update-supported-version: echo "promoting to $$s3_roles_root"; \ aws s3 cp --acl public-read $(BUILD_DIR)/artifacts/$(PF9_KUBE_VERSION) $${s3_roles_root}/$(PF9_KUBE_VERSION); \ done - diff --git a/nodelet/pkg/pf9kube/pf9/pf9-kube/defaults.env b/nodelet/pkg/pf9kube/pf9/pf9-kube/defaults.env index 29cf7611..a06a1161 100644 --- a/nodelet/pkg/pf9kube/pf9/pf9-kube/defaults.env +++ b/nodelet/pkg/pf9kube/pf9/pf9-kube/defaults.env @@ -100,8 +100,10 @@ ETCD_VERSION=3.4.14 ETCD_CONTAINER_IMG="gcr.io/etcd-development/etcd:v${ETCD_VERSION}" # KEEPALIVED config directory -KEEPALIVED_VERSION="v2.1.3" MASTER_VIP_KEEPALIVED_CONF_FILE="/etc/keepalived/keepalived.conf" +KEEPALIVED_VERSION_UBUNTU="v2.1.3" +KEEPALIVED_VERSION_RHEL7="v2.1.3" +KEEPALIVED_VERSION_RHEL8="v2.1.5" #VRRP configs VRRP_HEALTH_CHECK_INTERVAL=10 diff --git a/nodelet/pkg/pf9kube/pf9/pf9-kube/os.sh b/nodelet/pkg/pf9kube/pf9/pf9-kube/os.sh index d16d640c..4b463200 100644 --- a/nodelet/pkg/pf9kube/pf9/pf9-kube/os.sh +++ b/nodelet/pkg/pf9kube/pf9/pf9-kube/os.sh @@ -196,12 +196,13 @@ function check_keepalived_installed() echo "Keepalived found, checking version" local keepalived_version_installed=$(keepalived --version 2>&1 >/dev/null | head -1 | cut -d " " -f 2) echo "keepalived installed version = ${keepalived_version_installed}" - if [ ${keepalived_version_installed} == ${KEEPALIVED_VERSION} ]; then - echo "Expected Keepalived version is installed" + local keepalived_version_expected=$(get_expected_keepalived_version) + if [ ${keepalived_version_installed} == ${keepalived_version_expected} ]; then + echo "Expected Keepalived version ${keepalived_version_expected} is installed" IS_KEEPALIVED_INSTALLED=1 return fi - echo "Keepalived version ${KEEPALIVED_VERSION} expected but ${keepalived_version_installed} is found" + echo "Keepalived version ${keepalived_version_expected} expected but ${keepalived_version_installed} is found" IS_KEEPALIVED_INSTALLED=0 return fi diff --git a/nodelet/pkg/pf9kube/pf9/pf9-kube/os_centos.sh b/nodelet/pkg/pf9kube/pf9/pf9-kube/os_centos.sh index d7452b3f..b03dfdcd 100644 --- a/nodelet/pkg/pf9kube/pf9/pf9-kube/os_centos.sh +++ b/nodelet/pkg/pf9kube/pf9/pf9-kube/os_centos.sh @@ -1,5 +1,6 @@ source defaults.env source runtime.sh +source /etc/os-release PWD=$(pwd) PF9_TE_FILE="$PWD/pf9.te" @@ -385,7 +386,7 @@ function configure_containerd_http_proxy() mkdir -p "$CONTAINERD_DROPIN_DIR" cat > "$override_cfg" < /etc/apt/sources.list.d/docker.list - + # if the upstream repo is not available use the updated repo if [ "$DOCKER_UBUNTU_REPO_URL" ]; then echo "deb $DOCKER_UBUNTU_REPO_URL" >> /etc/apt/sources.list.d/docker.list @@ -263,7 +263,7 @@ function configure_containerd_http_proxy() mkdir -p "$CONTAINERD_DROPIN_DIR" cat > "$override_cfg" <