Skip to content

Commit f46697f

Browse files
committed
Wait for worker MCP to be updated before running RHEL worker upgrade
1 parent 18e82d8 commit f46697f

File tree

2 files changed

+32
-8
lines changed

2 files changed

+32
-8
lines changed

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

Lines changed: 30 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -308,6 +308,30 @@ EOF
308308
ansible-playbook -i "${SHARED_DIR}/ansible-hosts" /tmp/repo.yaml -vvv
309309
}
310310

311+
function rhel_pre_unpause(){
312+
echo "Running the workaround step before unpausing worker mcp"
313+
local testcase="rhel"
314+
cat > /tmp/rhel_pre_unpause.yaml <<-'EOF'
315+
---
316+
- name: RHEL pre-unpause playbook
317+
hosts: workers
318+
any_errors_fatal: true
319+
gather_facts: false
320+
vars:
321+
required_packages:
322+
- ose-azure-acr-image-credential-provider
323+
- ose-gcp-gcr-image-credential-provider
324+
tasks:
325+
- name: Install required package on the node
326+
dnf:
327+
name: "{{ required_packages }}"
328+
state: latest
329+
disable_gpg_check: true
330+
EOF
331+
ansible-inventory -i "${SHARED_DIR}/ansible-hosts" --list --yaml
332+
ansible-playbook -i "${SHARED_DIR}/ansible-hosts" /tmp/rhel_pre_unpause.yaml -vvv
333+
}
334+
311335
# Do sdn migration to ovn since sdn is not supported from 4.17 version
312336
function sdn2ovn(){
313337
oc patch network.operator.openshift.io cluster --type='merge' -p='{"spec":{"defaultNetwork":{"ovnKubernetesConfig":{"ipv4":{"internalJoinSubnet": "100.65.0.0/16"}}}}}'
@@ -1152,6 +1176,12 @@ for target in "${TARGET_RELEASES[@]}"; do
11521176
run_command "oc get node -owide"
11531177
if [[ $(oc get machineconfigpools worker -ojson | jq -r '.spec.paused') == "true" ]]; then
11541178
echo "worker mcp are paused, it sounds eus upgrade, skip rhel worker upgrade here, should upgrade them after worker mcp unpaused"
1179+
#Temporary workaround for 4.14 to 4.16 cpou test with RHEL workers, would be removed until https://github.com/openshift/openshift-ansible/pull/12531 merged
1180+
if [[ "${SOURCE_MINOR_VERSION}" == "14" ]]; then
1181+
echo "Running workaround for https://issues.redhat.com/browse/OCPBUGS-32057 in 4.14 to 4.16 cpou test"
1182+
rhel_repo
1183+
rhel_pre_unpause
1184+
fi
11551185
else
11561186
rhel_repo
11571187
rhel_upgrade

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

Lines changed: 2 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -100,11 +100,5 @@ do
100100
printf "\n"
101101
unpause ${mcp}
102102
printf "\n"
103-
if [[ "${current_minor_ver}" -lt "19" ]] && [[ $(oc get nodes -l node.openshift.io/os_id=rhel) != "" ]]; then
104-
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..."
105-
run_command "oc get machineconfigpools"
106-
run_command "oc get node -owide"
107-
else
108-
check_mcp ${mcp} "True"
109-
fi
110-
done
103+
check_mcp ${mcp} "True"
104+
done

0 commit comments

Comments
 (0)