Description of problem:
Since way back in 2019, oc adm upgrade ... has been looking at ClusterVersion conditions, expecting to see Degraded. But Degraded is strictly a ClusterOperator thing. ClusterVersion fills a similar role with Failing (although it's not clear to me why folks decided against sticking with the same condition slug for the similar roles). We should pivot oc adm upgrade ... to look for the Failing that might actually exist in ClusterVersion.
Version-Release number of selected component (if applicable):
All released oc in v4.
How reproducible:
100%
Steps to Reproduce:
1. Scale down the cluster-version operator: oc scale --replicas 0 -n openshift-cluster-version deployments/cluster-version-operator
2. Patch in a failing condition:
$ CONDITIONS="$(oc get -o json clusterversion version | jq -c '[.status.conditions[] | if .type == "Failing" then .status = "True" | .message = "Seriously bad things going on." else . end]')" $ oc patch --subresource status clusterversion version --type json -p "[{\"op\": \"add\", \"path\": \"/status/conditions\", \"value\": ${CONDITIONS}}]"
3. Check status: oc adm upgrade
4. Ask for an update: oc adm upgrade --allow-explicit-upgrade --to-image quay.io/openshift-release-dev/ocp-release@sha256:b8307ac0f3ec4ac86c3f3b52846425205022da52c16f56ec31cbe428501001d6
Actual results:
Neither step 3 nor 4 mentions the Failing=True condition.
Expected results:
Both step 3 and 4 mention the Failing=True condition, and step 4 fails requesting --allow-upgrade-with-warnings if you want to update anyway.