|
| 1 | +// Module included in the following assemblies: |
| 2 | +// |
| 3 | +// * updating/understanding_updates/how-updates-work.adoc |
| 4 | + |
| 5 | +:_content-type: CONCEPT |
| 6 | +[id="update-cluster-version-object_{context}"] |
| 7 | += The ClusterVersion object |
| 8 | + |
| 9 | +One of the resources that the Cluster Version Operator (CVO) monitors is the `ClusterVersion` resource. |
| 10 | + |
| 11 | +Administrators and OpenShift components can communicate or interact with the CVO through the `ClusterVersion` object. |
| 12 | +The desired CVO state is declared through the `ClusterVersion` object and the current CVO state is reflected in the object's status. |
| 13 | + |
| 14 | +[NOTE] |
| 15 | +==== |
| 16 | +Do not directly modify the `ClusterVersion` object. Instead, use interfaces such as the `oc` CLI or the web console to declare your update target. |
| 17 | +==== |
| 18 | + |
| 19 | +The CVO continually reconciles the cluster with the target state declared in the `spec` property of the `ClusterVersion` resource. |
| 20 | +When the desired release differs from the actual release, that reconciliation updates the cluster. |
| 21 | + |
| 22 | +//to-do: this might be heading overload, consider deleting this heading if the context switch from the previous paragraph to this content is smooth enough to not require one. |
| 23 | +[discrete] |
| 24 | +== Update availability data |
| 25 | + |
| 26 | +The `ClusterVersion` resource also contains information about updates that are available to the cluster. |
| 27 | +This includes updates that are available, but not recommended due to a known risk that applies to the cluster. |
| 28 | +These updates are known as conditional updates. |
| 29 | +To learn how the CVO maintains this information about available updates in the `ClusterVersion` resource, see the "Evaluation of update availability" section. |
| 30 | + |
| 31 | +* You can inspect all available updates with the following command: |
| 32 | ++ |
| 33 | +[source,terminal] |
| 34 | +---- |
| 35 | +$ oc adm upgrade --include-not-recommended |
| 36 | +---- |
| 37 | ++ |
| 38 | +[NOTE] |
| 39 | +==== |
| 40 | +The additional `--include-not-recommended` parameter includes updates that are available but not recommended due to a known risk that applies to the cluster. |
| 41 | +==== |
| 42 | ++ |
| 43 | +.Example output |
| 44 | +[source,terminal] |
| 45 | +---- |
| 46 | +Cluster version is 4.10.22 |
| 47 | +
|
| 48 | +Upstream is unset, so the cluster will use an appropriate default. |
| 49 | +Channel: fast-4.11 (available channels: candidate-4.10, candidate-4.11, eus-4.10, fast-4.10, fast-4.11, stable-4.10) |
| 50 | +
|
| 51 | +Recommended updates: |
| 52 | +
|
| 53 | + VERSION IMAGE |
| 54 | + 4.10.26 quay.io/openshift-release-dev/ocp-release@sha256:e1fa1f513068082d97d78be643c369398b0e6820afab708d26acda2262940954 |
| 55 | + 4.10.25 quay.io/openshift-release-dev/ocp-release@sha256:ed84fb3fbe026b3bbb4a2637ddd874452ac49c6ead1e15675f257e28664879cc |
| 56 | + 4.10.24 quay.io/openshift-release-dev/ocp-release@sha256:aab51636460b5a9757b736a29bc92ada6e6e6282e46b06e6fd483063d590d62a |
| 57 | + 4.10.23 quay.io/openshift-release-dev/ocp-release@sha256:e40e49d722cb36a95fa1c03002942b967ccbd7d68de10e003f0baa69abad457b |
| 58 | +
|
| 59 | +Supported but not recommended updates: |
| 60 | +
|
| 61 | + Version: 4.11.0 |
| 62 | + Image: quay.io/openshift-release-dev/ocp-release@sha256:300bce8246cf880e792e106607925de0a404484637627edf5f517375517d54a4 |
| 63 | + Recommended: False |
| 64 | + Reason: RPMOSTreeTimeout |
| 65 | + Message: Nodes with substantial numbers of containers and CPU contention may not reconcile machine configuration https://bugzilla.redhat.com/show_bug.cgi?id=2111817#c22 |
| 66 | +---- |
| 67 | ++ |
| 68 | +The `oc adm upgrade` command queries the `ClusterVersion` resource for information about available updates and presents it in a human-readable format. |
| 69 | + |
| 70 | +* One way to directly inspect the underlying availability data created by the CVO is by querying the `ClusterVersion` resource with the following command: |
| 71 | ++ |
| 72 | +[source,terminal] |
| 73 | +---- |
| 74 | +$ oc get clusterversion version -o json | jq '.status.availableUpdates' |
| 75 | +---- |
| 76 | ++ |
| 77 | +.Example output |
| 78 | +[source,terminal] |
| 79 | +---- |
| 80 | +[ |
| 81 | + { |
| 82 | + "channels": [ |
| 83 | + "candidate-4.11", |
| 84 | + "candidate-4.12", |
| 85 | + "fast-4.11", |
| 86 | + "fast-4.12" |
| 87 | + ], |
| 88 | + "image": "quay.io/openshift-release-dev/ocp-release@sha256:400267c7f4e61c6bfa0a59571467e8bd85c9188e442cbd820cc8263809be3775", |
| 89 | + "url": "https://access.redhat.com/errata/RHBA-2023:3213", |
| 90 | + "version": "4.11.41" |
| 91 | + }, |
| 92 | + ... |
| 93 | +] |
| 94 | +---- |
| 95 | + |
| 96 | +* A similar command can be used to check conditional updates: |
| 97 | ++ |
| 98 | +[source,terminal] |
| 99 | +---- |
| 100 | +$ oc get clusterversion version -o json | jq '.status.conditionalUpdates' |
| 101 | +---- |
| 102 | ++ |
| 103 | +.Example output |
| 104 | +[source,terminal] |
| 105 | +---- |
| 106 | +[ |
| 107 | + { |
| 108 | + "conditions": [ |
| 109 | + { |
| 110 | + "lastTransitionTime": "2023-05-30T16:28:59Z", |
| 111 | + "message": "The 4.11.36 release only resolves an installation issue https://issues.redhat.com//browse/OCPBUGS-11663 , which does not affect already running clusters. 4.11.36 does not include fixes delivered in recent 4.11.z releases and therefore upgrading from these versions would cause fixed bugs to reappear. Red Hat does not recommend upgrading clusters to 4.11.36 version for this reason. https://access.redhat.com/solutions/7007136", |
| 112 | + "reason": "PatchesOlderRelease", |
| 113 | + "status": "False", |
| 114 | + "type": "Recommended" |
| 115 | + } |
| 116 | + ], |
| 117 | + "release": { |
| 118 | + "channels": [...], |
| 119 | + "image": "quay.io/openshift-release-dev/ocp-release@sha256:8c04176b771a62abd801fcda3e952633566c8b5ff177b93592e8e8d2d1f8471d", |
| 120 | + "url": "https://access.redhat.com/errata/RHBA-2023:1733", |
| 121 | + "version": "4.11.36" |
| 122 | + }, |
| 123 | + "risks": [...] |
| 124 | + }, |
| 125 | + ... |
| 126 | +] |
| 127 | +---- |
0 commit comments