Skip to content

Commit 79e2456

Browse files
authored
Merge pull request #54533 from ousleyp/cnv-17781
CNV-17781: EUS-to-EUS update info for OCP virt
2 parents cb6bd53 + 9efab4c commit 79e2456

File tree

3 files changed

+233
-5
lines changed

3 files changed

+233
-5
lines changed

modules/virt-about-eus-updates.adoc

Lines changed: 22 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,22 @@
1+
// Module included in the following assemblies:
2+
//
3+
// * virt/upgrading-virt.adoc
4+
5+
:_content-type: CONCEPT
6+
[id="virt-about-eus-updates_{context}"]
7+
= About EUS-to-EUS updates
8+
9+
Every even-numbered minor version of {product-title}, including 4.10 and 4.12, is an Extended Update Support (EUS) version. However, because Kubernetes design mandates serial minor version updates, you cannot directly update from one EUS version to the next. You must first update to the each z-stream release of the odd-numbered minor version before you can proceed to the target EUS version.
10+
11+
Before beginning an EUS-to-EUS update, you must:
12+
13+
* Pause worker nodes' machine config pools before you start an EUS-to-EUS update so that the workers are not rebooted twice.
14+
15+
* Disable automatic workload updates before you begin the update process. This is to prevent {VirtProductName} from migrating or evicting your virtual machines (VMs) until you update to your target EUS version.
16+
17+
[NOTE]
18+
====
19+
By default, {VirtProductName} automatically updates workloads, such as the `virt-launcher` pod, when you update the {VirtProductName} Operator. You can configure this behavior in the `spec.workloadUpdateStrategy` stanza of the `HyperConverged` custom resource.
20+
====
21+
22+
// link to EUS to EUS docs in assembly due to module limitations
Lines changed: 201 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,201 @@
1+
// Module included in the following assemblies:
2+
//
3+
// * virt/upgrading-virt.adoc
4+
5+
:_content-type: PROCEDURE
6+
[id="virt-preventing-workload-updates-during-eus-update_{context}"]
7+
= Preventing workload updates during an EUS-to-EUS update
8+
9+
When you update from one Extended Update Support (EUS) version to the next, you must manually disable automatic workload updates to prevent {VirtProductName} from migrating or evicting workloads during the update process.
10+
11+
.Prerequisites
12+
13+
* You are running an EUS version of {product-title} and want to update to the next EUS version. You have not yet updated to the odd-numbered version in between.
14+
15+
* You read "Preparing to perform an EUS-to-EUS update" and learned the caveats and requirements that pertain to your {product-title} cluster.
16+
17+
* You paused the worker nodes' machine config pools as directed by the {product-title} documentation.
18+
19+
* Your {VirtProductName} subscription uses the *Automatic* approval strategy.
20+
+
21+
[NOTE]
22+
====
23+
If you use the *Manual* approval strategy, you must approve all pending updates in the web console. This is discouraged because your cluster becomes unsupported if your {VirtProductName} and {product-title} versions are out of sync. For more details, refer to the "Manually approving a pending Operator update" section.
24+
====
25+
26+
.Procedure
27+
28+
. Back up the current `workloadUpdateMethods` configuration by running the following command:
29+
+
30+
[source,terminal]
31+
----
32+
$ WORKLOAD_UPDATE_METHODS=$(oc get kv kubevirt-kubevirt-hyperconverged -n openshift-cnv -o jsonpath='{.spec.workloadUpdateStrategy.workloadUpdateMethods}')
33+
----
34+
35+
. Turn off all workload update methods by running the following command:
36+
+
37+
[source,terminal]
38+
----
39+
$ oc patch hco kubevirt-hyperconverged -n openshift-cnv --type json -p '[{"op":"replace","path":"/spec/workloadUpdateStrategy/workloadUpdateMethods", "value":[]}]'
40+
----
41+
+
42+
.Example output
43+
[source,terminal]
44+
----
45+
hyperconverged.hco.kubevirt.io/kubevirt-hyperconverged patched
46+
----
47+
48+
. Ensure that the `HyperConverged` Operator is `Upgradeable` before you continue. Enter the following command and monitor the output:
49+
+
50+
[source,terminal]
51+
----
52+
$ oc get hco kubevirt-hyperconverged -n openshift-cnv -o json | jq ".status.conditions"
53+
----
54+
+
55+
.Example output
56+
[%collapsible]
57+
====
58+
[source,json]
59+
----
60+
[
61+
{
62+
"lastTransitionTime": "2022-12-09T16:29:11Z",
63+
"message": "Reconcile completed successfully",
64+
"observedGeneration": 3,
65+
"reason": "ReconcileCompleted",
66+
"status": "True",
67+
"type": "ReconcileComplete"
68+
},
69+
{
70+
"lastTransitionTime": "2022-12-09T20:30:10Z",
71+
"message": "Reconcile completed successfully",
72+
"observedGeneration": 3,
73+
"reason": "ReconcileCompleted",
74+
"status": "True",
75+
"type": "Available"
76+
},
77+
{
78+
"lastTransitionTime": "2022-12-09T20:30:10Z",
79+
"message": "Reconcile completed successfully",
80+
"observedGeneration": 3,
81+
"reason": "ReconcileCompleted",
82+
"status": "False",
83+
"type": "Progressing"
84+
},
85+
{
86+
"lastTransitionTime": "2022-12-09T16:39:11Z",
87+
"message": "Reconcile completed successfully",
88+
"observedGeneration": 3,
89+
"reason": "ReconcileCompleted",
90+
"status": "False",
91+
"type": "Degraded"
92+
},
93+
{
94+
"lastTransitionTime": "2022-12-09T20:30:10Z",
95+
"message": "Reconcile completed successfully",
96+
"observedGeneration": 3,
97+
"reason": "ReconcileCompleted",
98+
"status": "True",
99+
"type": "Upgradeable" <1>
100+
}
101+
]
102+
----
103+
====
104+
<1> The {VirtProductName} Operator has the `Upgradeable` status.
105+
106+
. Manually update your cluster from the source EUS version to the next minor version of {product-title}:
107+
+
108+
[source,terminal]
109+
+
110+
----
111+
$ oc adm upgrade
112+
----
113+
+
114+
.Verification
115+
* Check the current version by running the following command:
116+
+
117+
[source,terminal]
118+
----
119+
$ oc get clusterversion
120+
----
121+
+
122+
[NOTE]
123+
====
124+
Updating {product-title} to the next version is a prerequisite for updating {VirtProductName}. For more details, refer to the "Updating clusters" section of the {product-title} documentation.
125+
====
126+
127+
. With the default *Automatic* approval strategy, {VirtProductName} automatically updates to the corresponding version after you update {product-title}. Monitor the {VirtProductName} update by running the following command:
128+
+
129+
[source,terminal]
130+
----
131+
$ oc get csv -n openshift-cnv
132+
----
133+
134+
. Continue to monitor as {VirtProductName} updates to the z-stream versions that are available for the non-EUS version.
135+
136+
. Confirm that {VirtProductName} successfully updated to the latest z-stream release of the non-EUS version by running the following command:
137+
+
138+
[source,terminal]
139+
----
140+
$ oc get hco kubevirt-hyperconverged -n openshift-cnv -o json | jq ".status.versions"
141+
----
142+
+
143+
.Example output
144+
[source,terminal,subs="attributes+"]
145+
----
146+
[
147+
{
148+
"name": "operator",
149+
"version": "{HCOVersion}"
150+
}
151+
]
152+
----
153+
154+
. Wait until the `HyperConverged` Operator has the `Upgradeable` status before you perform the next update. Enter the following command and monitor the output:
155+
+
156+
[source,terminal]
157+
----
158+
$ oc get hco kubevirt-hyperconverged -n openshift-cnv -o json | jq ".status.conditions"
159+
----
160+
161+
. Update to the target EUS version.
162+
.. Update {product-title} to the target EUS version. Confirm that the update succeeded by checking the cluster version:
163+
+
164+
[source,terminal]
165+
----
166+
$ oc get clusterversion
167+
----
168+
.. After {product-title} updates, {VirtProductName} automatically updates to the target EUS version. Monitor the update by running the following command:
169+
+
170+
[source,terminal]
171+
----
172+
$ oc get csv -n openshift-cnv
173+
----
174+
+
175+
The update completes when the `VERSION` field matches the target EUS version and the `PHASE` field reads `Succeeded`.
176+
177+
. Restore the workload update methods configuration that you backed up:
178+
+
179+
[source,terminal]
180+
----
181+
$ oc patch hco kubevirt-hyperconverged -n openshift-cnv --type json -p "[{\"op\":\"add\",\"path\":\"/spec/workloadUpdateStrategy/workloadUpdateMethods\", \"value\":$WORKLOAD_UPDATE_METHODS}]"
182+
----
183+
+
184+
.Example output
185+
[source,terminal]
186+
----
187+
hyperconverged.hco.kubevirt.io/kubevirt-hyperconverged patched
188+
----
189+
+
190+
.Verification
191+
192+
* Check the status of VM migration by running the following command:
193+
+
194+
[source,terminal]
195+
----
196+
$ oc get vmim -A
197+
----
198+
199+
.Next steps
200+
201+
* You can now unpause the worker nodes' machine config pools.

virt/upgrading-virt.adoc

Lines changed: 10 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -20,12 +20,15 @@ You must perform one of the following tasks before updating to {VirtProductName}
2020

2121
include::modules/virt-about-upgrading-virt.adoc[leveloffset=+1]
2222

23-
[id="configuring-workload-updates_upgrading-virt"]
24-
== Configuring automatic workload updates
25-
2623
include::modules/virt-about-workload-updates.adoc[leveloffset=+2]
2724

28-
include::modules/virt-configuring-workload-update-methods.adoc[leveloffset=+2]
25+
include::modules/virt-about-eus-updates.adoc[leveloffset=+2]
26+
27+
Learn more about xref:../updating/preparing-eus-eus-upgrade.adoc#preparing-eus-eus-upgrade[preparing to perform an EUS-to-EUS update].
28+
29+
include::modules/virt-preventing-workload-updates-during-eus-update.adoc[leveloffset=+1]
30+
31+
include::modules/virt-configuring-workload-update-methods.adoc[leveloffset=+1]
2932

3033
[id="approving-operator-upgrades_upgrading-virt"]
3134
== Approving pending Operator updates
@@ -41,13 +44,15 @@ include::modules/virt-viewing-outdated-workloads.adoc[leveloffset=+2]
4144

4245
[NOTE]
4346
====
44-
xref:../virt/upgrading-virt.adoc#configuring-workload-updates_upgrading-virt[Configure workload updates] to ensure that VMIs update automatically.
47+
Configure workload updates to ensure that VMIs update automatically.
4548
====
4649

4750
[id="additional-resources_upgrading-virt"]
4851
[role="_additional-resources"]
4952
== Additional resources
5053

54+
* xref:../updating/preparing-eus-eus-upgrade.adoc#preparing-eus-eus-upgrade[Preparing to perform an EUS-to-EUS update]
55+
5156
* xref:../operators/understanding/olm-what-operators-are.adoc#olm-what-operators-are[What are Operators?]
5257

5358
* xref:../operators/understanding/olm/olm-understanding-olm.adoc#olm-understanding-olm[Operator Lifecycle Manager concepts and resources]

0 commit comments

Comments
 (0)