diff --git a/ci-operator/step-registry/cucushift/chainupgrade/toimage/cucushift-chainupgrade-toimage-commands.sh b/ci-operator/step-registry/cucushift/chainupgrade/toimage/cucushift-chainupgrade-toimage-commands.sh index e043438e5a550..95824cc83c93e 100644 --- a/ci-operator/step-registry/cucushift/chainupgrade/toimage/cucushift-chainupgrade-toimage-commands.sh +++ b/ci-operator/step-registry/cucushift/chainupgrade/toimage/cucushift-chainupgrade-toimage-commands.sh @@ -1147,7 +1147,7 @@ for target in "${TARGET_RELEASES[@]}"; do upgrade check_upgrade_status - if [[ $(oc get nodes -l node.openshift.io/os_id=rhel) != "" ]]; then + if [[ "${TARGET_MINOR_VERSION}" -lt "19" ]] && [[ $(oc get nodes -l node.openshift.io/os_id=rhel) != "" ]]; then echo "Found rhel worker..." run_command "oc get node -owide" if [[ $(oc get machineconfigpools worker -ojson | jq -r '.spec.paused') == "true" ]]; then diff --git a/ci-operator/step-registry/cucushift/upgrade/cpou/unpause-worker-mcp/cucushift-upgrade-cpou-unpause-worker-mcp-commands.sh b/ci-operator/step-registry/cucushift/upgrade/cpou/unpause-worker-mcp/cucushift-upgrade-cpou-unpause-worker-mcp-commands.sh index 910edf4754fc6..c523772c13786 100644 --- a/ci-operator/step-registry/cucushift/upgrade/cpou/unpause-worker-mcp/cucushift-upgrade-cpou-unpause-worker-mcp-commands.sh +++ b/ci-operator/step-registry/cucushift/upgrade/cpou/unpause-worker-mcp/cucushift-upgrade-cpou-unpause-worker-mcp-commands.sh @@ -90,6 +90,9 @@ for mcp in "${normal_mcp_arr[@]}" do check_mcp ${mcp} "True" done +current_minor_ver="$(oc get clusterversion --no-headers | awk '{print $2}' | cut -f2 -d.)" +echo -e "current minor version: ${current_minor_ver} \n" + IFS=" " read -r -a arr <<<"$PAUSED_MCP_NAME" for mcp in "${arr[@]}"; do @@ -97,7 +100,7 @@ do printf "\n" unpause ${mcp} printf "\n" - if [[ $(oc get nodes -l node.openshift.io/os_id=rhel) != "" ]]; then + if [[ "${current_minor_ver}" -lt "19" ]] && [[ $(oc get nodes -l node.openshift.io/os_id=rhel) != "" ]]; then echo "Found rhel worker, this step is supposed to be used in eus upgrade, skipping mcp checking here, need to check it after rhel worker upgraded..." run_command "oc get machineconfigpools" run_command "oc get node -owide" diff --git a/ci-operator/step-registry/cucushift/upgrade/rhel-worker/cucushift-upgrade-rhel-worker-commands.sh b/ci-operator/step-registry/cucushift/upgrade/rhel-worker/cucushift-upgrade-rhel-worker-commands.sh index ca2bf9ec08983..6b4a776c19bd7 100644 --- a/ci-operator/step-registry/cucushift/upgrade/rhel-worker/cucushift-upgrade-rhel-worker-commands.sh +++ b/ci-operator/step-registry/cucushift/upgrade/rhel-worker/cucushift-upgrade-rhel-worker-commands.sh @@ -207,13 +207,13 @@ EOF # Upgrade RHEL node function rhel_upgrade(){ + local testcase="rhel" echo "Upgrading RHEL nodes" echo "Validating parsed Ansible inventory" ansible-inventory -i "${SHARED_DIR}/ansible-hosts" --list --yaml echo -e "\nRunning RHEL worker upgrade" sed -i 's|^remote_tmp.*|remote_tmp = /tmp/.ansible|g' /usr/share/ansible/openshift-ansible/ansible.cfg ansible-playbook -i "${SHARED_DIR}/ansible-hosts" /usr/share/ansible/openshift-ansible/playbooks/upgrade.yml -vvv || { export UPGRADE_FAILURE_TYPE="${testcase}"; return 1; } - check_upgrade_status }