If the CVO is updating to a new version but hits an error, `oc get clusterversion` prints no value in the status column because the CRD is viewing the wrong object. Instead, use the first entry in the history list which is always the "desired" or "completed" version. https://github.com/openshift/cluster-version-operator/pull/189 merged to master right after 4.2 branch but before 4.1. This fix should be in 4.1.z to ensure users aren't confused during upgrades.
Reproduce on 4.1.0-0.nightly-2019-05-05-070156 Steps: 1. Install cluster with 4.1.0-0.nightly-2019-05-05-070156 nightly build. 2. Run "oc adm upgrade --to-image=registry.svc.ci.openshift.org/ocp/release:4.1.0-0.nightly-2019-06-27-201210" to do upgrade, but failed due to image signature 3. Check the version column is empty in "oc get clusterversion" output, and so is the desiredUpdate in clusterversion. # oc get clusterversion NAME VERSION AVAILABLE PROGRESSING SINCE STATUS version True True 7s Unable to apply registry.svc.ci.openshift.org/ocp/release:4.1.0-0.nightly-2019-06-27-201210: the image may not be safe to use # oc get clusterversion -o json|jq ".items[0].spec" { "channel": "stable-4.1", "clusterID": "9d2ccb4c-64a6-468a-8009-f4d318753a8e", "desiredUpdate": { "image": "registry.svc.ci.openshift.org/ocp/release:4.1.0-0.nightly-2019-06-27-201210", "version": "" }, "upstream": "https://api.openshift.com/api/upgrades_info/v1/graph" }
Verified on 4.1.0-0.nightly-2019-07-03-205519 # oc get clusterversion NAME VERSION AVAILABLE PROGRESSING SINCE STATUS version 4.1.0-0.nightly-2019-07-03-205519 True True 5s Unable to apply registry.svc.ci.openshift.org/ocp/release:4.1.0-0.nightly-2019-07-03-035331: the image may not be safe to use # oc get clusterversion -o json|jq '.items[0].status.history' [ { "completionTime": null, "image": "registry.svc.ci.openshift.org/ocp/release:4.1.0-0.nightly-2019-07-03-035331", "startedTime": "2019-07-04T06:58:26Z", "state": "Partial", "verified": false, "version": "" }, { "completionTime": "2019-07-04T06:58:26Z", "image": "registry.svc.ci.openshift.org/ocp/release@sha256:58dfc409525884a606e5cc814e10c849544ed885e3e5fbb118f4deab3059465f", "startedTime": "2019-07-04T06:40:38Z", "state": "Completed", "verified": false, "version": "4.1.0-0.nightly-2019-07-03-205519" } ]
Since the problem described in this bug report should be resolved in a recent advisory, it has been closed with a resolution of ERRATA. For information on the advisory, and where to find the updated files, follow the link below. If the solution does not work for you, open a new bug report. https://access.redhat.com/errata/RHBA-2019:1766