Skip to content

Commit 30c4b25

Browse files
committed
sync rhel update for chainupgrade&cpou steps
1 parent 16eaf7d commit 30c4b25

File tree

3 files changed

+6
-3
lines changed

3 files changed

+6
-3
lines changed

ci-operator/step-registry/cucushift/chainupgrade/toimage/cucushift-chainupgrade-toimage-commands.sh

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1147,7 +1147,7 @@ for target in "${TARGET_RELEASES[@]}"; do
11471147
upgrade
11481148
check_upgrade_status
11491149

1150-
if [[ $(oc get nodes -l node.openshift.io/os_id=rhel) != "" ]]; then
1150+
if [[ "${TARGET_MINOR_VERSION}" -lt "19" ]] && [[ $(oc get nodes -l node.openshift.io/os_id=rhel) != "" ]]; then
11511151
echo "Found rhel worker..."
11521152
run_command "oc get node -owide"
11531153
if [[ $(oc get machineconfigpools worker -ojson | jq -r '.spec.paused') == "true" ]]; then

ci-operator/step-registry/cucushift/upgrade/cpou/unpause-worker-mcp/cucushift-upgrade-cpou-unpause-worker-mcp-commands.sh

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -90,14 +90,17 @@ for mcp in "${normal_mcp_arr[@]}"
9090
do
9191
check_mcp ${mcp} "True"
9292
done
93+
current_minor_ver="$(oc get clusterversion --no-headers | awk '{print $2}' | cut -f2 -d.)"
94+
echo -e "current minor version: ${current_minor_ver} \n"
95+
9396
IFS=" " read -r -a arr <<<"$PAUSED_MCP_NAME"
9497
for mcp in "${arr[@]}";
9598
do
9699
check_mcp $mcp "False"
97100
printf "\n"
98101
unpause ${mcp}
99102
printf "\n"
100-
if [[ $(oc get nodes -l node.openshift.io/os_id=rhel) != "" ]]; then
103+
if [[ "${current_minor_ver}" -lt "19" ]] && [[ $(oc get nodes -l node.openshift.io/os_id=rhel) != "" ]]; then
101104
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..."
102105
run_command "oc get machineconfigpools"
103106
run_command "oc get node -owide"

ci-operator/step-registry/cucushift/upgrade/rhel-worker/cucushift-upgrade-rhel-worker-commands.sh

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -207,13 +207,13 @@ EOF
207207

208208
# Upgrade RHEL node
209209
function rhel_upgrade(){
210+
local testcase="rhel"
210211
echo "Upgrading RHEL nodes"
211212
echo "Validating parsed Ansible inventory"
212213
ansible-inventory -i "${SHARED_DIR}/ansible-hosts" --list --yaml
213214
echo -e "\nRunning RHEL worker upgrade"
214215
sed -i 's|^remote_tmp.*|remote_tmp = /tmp/.ansible|g' /usr/share/ansible/openshift-ansible/ansible.cfg
215216
ansible-playbook -i "${SHARED_DIR}/ansible-hosts" /usr/share/ansible/openshift-ansible/playbooks/upgrade.yml -vvv || { export UPGRADE_FAILURE_TYPE="${testcase}"; return 1; }
216-
217217
check_upgrade_status
218218
}
219219

0 commit comments

Comments
 (0)