Skip to content

Commit 6344e4f

Browse files
authored
Merge pull request #55005 from obrown1205/use_ocadmupgrade2
GH#53054 modules/update-upgrading-cli: Use 'oc adm upgrade' for current status
2 parents a9fd3ec + 1143cbe commit 6344e4f

File tree

2 files changed

+34
-98
lines changed

2 files changed

+34
-98
lines changed

modules/update-upgrading-cli.adoc

Lines changed: 33 additions & 98 deletions
Original file line numberDiff line numberDiff line change
@@ -18,25 +18,11 @@ of the Customer Portal.
1818

1919
* Install the OpenShift CLI (`oc`) that matches the version for your updated version.
2020
* Log in to the cluster as user with `cluster-admin` privileges.
21-
* Install the `jq` package.
21+
2222
* Pause all `MachineHealthCheck` resources.
2323
2424
.Procedure
2525

26-
. Ensure that your cluster is available:
27-
+
28-
[source,terminal]
29-
----
30-
$ oc get clusterversion
31-
----
32-
+
33-
.Example output
34-
[source,terminal]
35-
----
36-
NAME VERSION AVAILABLE PROGRESSING SINCE STATUS
37-
version 4.9.23 True False 158m Cluster version is 4.9.23
38-
----
39-
4026
. View the available updates and note the version number of the update that
4127
you want to apply:
4228
+
@@ -51,7 +37,7 @@ $ oc adm upgrade
5137
Cluster version is 4.9.23
5238
5339
Upstream is unset, so the cluster will use an appropriate default.
54-
Channel: stable-4.10 (available channels: candidate-4.10, candidate-4.9, fast-4.10, fast-4.9, stable-4.10, stable-4.9)
40+
Channel: stable-4.9 (available channels: candidate-4.10, candidate-4.9, fast-4.10, fast-4.9, stable-4.10, stable-4.9, eus-4.10)
5541
5642
Recommended updates:
5743
@@ -64,30 +50,27 @@ VERSION IMAGE
6450
4.9.29 quay.io/openshift-release-dev/ocp-release@sha256:b04ca01d116f0134a102a57f86c67e5b1a3b5da1c4a580af91d521b8fa0aa6ec
6551
4.9.31 quay.io/openshift-release-dev/ocp-release@sha256:2a28b8ebb53d67dd80594421c39e36d9896b1e65cb54af81fbb86ea9ac3bf2d7
6652
4.9.32 quay.io/openshift-release-dev/ocp-release@sha256:ecdb6d0df547b857eaf0edb5574ddd64ca6d9aff1fa61fd1ac6fb641203bedfa
67-
4.10.3 quay.io/openshift-release-dev/ocp-release@sha256:7ffe4cd612be27e355a640e5eec5cd8f923c1400d969fd590f806cffdaabcc56
68-
4.10.4 quay.io/openshift-release-dev/ocp-release@sha256:9f9c3aaca64f62af992bae5de1e984571c8b812f598b74c84dc630b064389fb7
69-
4.10.5 quay.io/openshift-release-dev/ocp-release@sha256:ee6a9c7a11f883e90489229f6c6dc78b434af12f5646f4f9411d73a98969f02a
70-
4.10.6 quay.io/openshift-release-dev/ocp-release@sha256:88b394e633e09dc23aa1f1a61ededd8e52478edf34b51a7dbbb21d9abde2511a
71-
4.10.8 quay.io/openshift-release-dev/ocp-release@sha256:0696e249622b4d07d8f4501504b6c568ed6ba92416176a01a12b7f1882707117
72-
4.10.9 quay.io/openshift-release-dev/ocp-release@sha256:39f360002b9b5c730d1167879ad6437352d51e72acc9fe80add3ec2a0d20400d
73-
4.10.10 quay.io/openshift-release-dev/ocp-release@sha256:39efe13ef67cb4449f5e6cdd8a26c83c07c6a2ce5d235dfbc3ba58c64418fcf3
74-
4.10.11 quay.io/openshift-release-dev/ocp-release@sha256:0dc1a4b4d9ea7954987f63e506474a4f0dc55e5f1ea5c1f6f1179e2c09eaffda
75-
4.10.12 quay.io/openshift-release-dev/ocp-release@sha256:f77f4f75c1e1a4ddd0a0355f298a834db3473fd9ca473235013e9419d1df16db
76-
4.10.13 quay.io/openshift-release-dev/ocp-release@sha256:4f516616baed3cf84585e753359f7ef2153ae139c2e80e0191902fbd073c4143
77-
----
78-
79-
. Based on your organization requirements, set the upgrade channel to `stable-{product-version}`, `fast-{product-version}`, or `eus-{product-version}`:
53+
54+
----
55+
+
56+
[NOTE]
57+
====
58+
For details and information on how to perform an `EUS-to-EUS` channel upgrade, please refer to the
59+
_Preparing to perform an EUS-to-EUS upgrade_ page, listed in the Additional resources section.
60+
====
61+
62+
. Based on your organization requirements, set the appropriate upgrade channel. For example, you can set your channel to `stable-4.10`, `fast-4.10`, or `eus-4.10`. For more information about channels, refer to _Understanding update channels and releases_ listed in the Additional resources section.
8063
+
8164
[source,terminal]
8265
----
8366
$ oc adm upgrade channel <channel>
8467
----
8568
+
86-
For example, to set the channel to `stable-{product-version}`:
69+
For example, to set the channel to `stable-4.10`:
8770
+
88-
[source,terminal,subs="attributes+"]
71+
[source,terminal]
8972
----
90-
$ oc adm upgrade channel stable-{product-version}
73+
$ oc adm upgrade channel stable-4.10
9174
----
9275
+
9376
[IMPORTANT]
@@ -116,78 +99,30 @@ $ oc adm upgrade --to=<version> <1>
11699
+
117100
[source,terminal]
118101
----
119-
$ oc get clusterversion -o json|jq ".items[0].spec"
120-
----
121-
+
122-
.Example output
123-
[source,terminal,subs="attributes+"]
124-
----
125-
{
126-
"channel": "stable-{product-version}",
127-
"clusterID": "990f7ab8-109b-4c95-8480-2bd1deec55ff",
128-
"desiredUpdate": {
129-
"force": false,
130-
"image": "quay.io/openshift-release-dev/ocp-release@sha256:9c5f0df8b192a0d7b46cd5f6a4da2289c155fd5302dec7954f8f06c878160b8b",
131-
"version": "<version>" <1>
132-
}
133-
}
134-
----
135-
<1> If the `version` number in the `desiredUpdate` stanza matches the value that
136-
you specified, the update is in progress.
137-
138-
. Review the cluster version status history to monitor the status of the update.
139-
It might take some time for all the objects to finish updating.
140-
+
141-
[source,terminal]
142-
----
143-
$ oc get clusterversion -o json|jq ".items[0].status.history"
144-
----
145-
+
146-
.Example output
147-
[source,terminal]
148-
----
149-
[
150-
{
151-
"completionTime": null,
152-
"image": "quay.io/openshift-release-dev/ocp-release@sha256:b8fa13e09d869089fc5957c32b02b7d3792a0b6f36693432acc0409615ab23b7",
153-
"startedTime": "2021-01-28T20:30:50Z",
154-
"state": "Partial",
155-
"verified": true,
156-
"version": "4.10.13"
157-
},
158-
{
159-
"completionTime": "2021-01-28T20:30:50Z",
160-
"image": "quay.io/openshift-release-dev/ocp-release@sha256:b8fa13e09d869089fc5957c32b02b7d3792a0b6f36693432acc0409615ab23b7",
161-
"startedTime": "2021-01-28T17:38:10Z",
162-
"state": "Completed",
163-
"verified": false,
164-
"version": "4.9.23"
165-
}
166-
]
102+
$ oc adm upgrade
167103
----
168-
+
169-
The history contains a list of the most recent versions applied to the cluster.
170-
This value is updated when the CVO applies an update. The list is ordered by
171-
date, where the newest update is first in the list. Updates in the history have
172-
state `Completed` if the rollout completed and `Partial` if the update failed
173-
or did not complete.
174104

175105
. After the update completes, you can confirm that the cluster version has
176106
updated to the new version:
177107
+
178108
[source,terminal]
179109
----
180-
$ oc get clusterversion
110+
$ oc adm upgrade
181111
----
182112
+
183113
.Example output
184-
[source,terminal,subs="attributes+"]
185-
----
186-
NAME VERSION AVAILABLE PROGRESSING SINCE STATUS
187-
version {product-version} True False 2m Cluster version is {product-version}
114+
[source,terminal]
188115
----
189116
190-
. If you are upgrading your cluster to the next minor version, like version 4.y to 4.(y+1), it is recommended to confirm your nodes are upgraded before deploying workloads that rely on a new feature:
117+
Cluster version is <version>
118+
119+
Upstream is unset, so the cluster will use an appropriate default.
120+
Channel: stable-4.10 (available channels: candidate-4.10, candidate-4.11, eus-4.10, fast-4.10, fast-4.11, stable-4.10)
121+
122+
No updates available. You may force an upgrade to a specific release image, but doing so might not be supported and might result in downtime or data loss.
123+
----
124+
+
125+
. If you are upgrading your cluster to the next minor version, such as version X.y to X.(y+1), it is recommended to confirm that your nodes are upgraded before deploying workloads that rely on a new feature:
191126
+
192127
[source,terminal]
193128
----
@@ -198,10 +133,10 @@ $ oc get nodes
198133
[source,terminal]
199134
----
200135
NAME STATUS ROLES AGE VERSION
201-
ip-10-0-168-251.ec2.internal Ready master 82m v1.25.0
202-
ip-10-0-170-223.ec2.internal Ready master 82m v1.25.0
203-
ip-10-0-179-95.ec2.internal Ready worker 70m v1.25.0
204-
ip-10-0-182-134.ec2.internal Ready worker 70m v1.25.0
205-
ip-10-0-211-16.ec2.internal Ready master 82m v1.25.0
206-
ip-10-0-250-100.ec2.internal Ready worker 69m v1.25.0
136+
ip-10-0-168-251.ec2.internal Ready master 82m v1.23.12+8a6bfe4
137+
ip-10-0-170-223.ec2.internal Ready master 82m v1.23.12+8a6bfe4
138+
ip-10-0-179-95.ec2.internal Ready worker 70m v1.23.12+8a6bfe4
139+
ip-10-0-182-134.ec2.internal Ready worker 70m v1.23.12+8a6bfe4
140+
ip-10-0-211-16.ec2.internal Ready master 82m v1.23.12+8a6bfe4
141+
ip-10-0-250-100.ec2.internal Ready worker 69m v1.23.12+8a6bfe4
207142
----

updating/updating-cluster-cli.adoc

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -60,6 +60,7 @@ include::modules/update-upgrading-cli.adoc[leveloffset=+1]
6060
[role="_additional-resources"]
6161
.Additional resources
6262

63+
* xref:../updating/preparing-eus-eus-upgrade.adoc#preparing-eus-eus-upgrade[Preparing to perform an EUS-to-EUS update]
6364
* xref:../updating/understanding-upgrade-channels-release.adoc#understanding-upgrade-channels-releases[Understanding upgrade channels and releases]
6465

6566
include::modules/update-conditional-updates.adoc[leveloffset=+1]

0 commit comments

Comments
 (0)