Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

fix openshift-managed-upgrade-operator ns doesn't exist for HCP cluster #51869

Merged
merged 1 commit into from
May 11, 2024
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -92,7 +92,7 @@ function upgrade_cluster_to () {
exit 1
fi

rosa upgrade cluster -y -m auto --version $recommended_version -c $cluster_id ${HCP_SWITCH} 1>"/tmp/update_info.txt" 2>&1
rosa upgrade cluster -y -m auto --version $recommended_version -c $cluster_id ${HCP_SWITCH} 1>"/tmp/update_info.txt" 2>&1 || true
upgrade_info=$(cat "/tmp/update_info.txt")
if [[ "$upgrade_info" == *"There is already"* ]]; then
log "Waiting for the previous upgrade schedule to be removed."
Expand All @@ -105,9 +105,11 @@ function upgrade_cluster_to () {

# Speed up the upgrading process
set_proxy
log "Force restarting the MUO pod to speed up the upgrading process."
muo_pod=$(oc get pod -n openshift-managed-upgrade-operator | grep 'managed-upgrade-operator' | grep -v 'catalog' | cut -d ' ' -f1)
oc delete pod $muo_pod -n openshift-managed-upgrade-operator
if [[ "$HOSTED_CP" == "false" ]]; then
log "Force restarting the MUO pod to speed up the upgrading process."
muo_pod=$(oc get pod -n openshift-managed-upgrade-operator | grep 'managed-upgrade-operator' | grep -v 'catalog' | cut -d ' ' -f1)
oc delete pod $muo_pod -n openshift-managed-upgrade-operator
fi
unset_proxy

# Upgrade cluster
Expand Down