Skip to content

Commit

Permalink
fix openshift-managed-upgrade-operator ns doesn't exist for HCP clust…
Browse files Browse the repository at this point in the history
…er (#51869)
  • Loading branch information
aaraj7 committed May 11, 2024
1 parent 351809f commit a8e7d48
Showing 1 changed file with 6 additions and 4 deletions.
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

0 comments on commit a8e7d48

Please sign in to comment.