Skip to content

Commit 2fcae99

Browse files
committed
OCPBUGS-33761: Expand the rolling back steps for the SDN network plugin
1 parent a6fa883 commit 2fcae99

File tree

2 files changed

+59
-33
lines changed

2 files changed

+59
-33
lines changed

modules/nw-ovn-kubernetes-rollback.adoc

Lines changed: 56 additions & 33 deletions
Original file line numberDiff line numberDiff line change
@@ -8,7 +8,7 @@
88
[id="nw-ovn-kubernetes-rollback_{context}"]
99
= Using the offline migration method to roll back to the OpenShift SDN network plugin
1010

11-
As a cluster administrator, you can roll back to the OpenShift SDN Container Network Interface (CNI) network plugin by using the offline migration method. During the migration you must manually reboot every node in your cluster. With the offline migration method, there is some downtime, during which your cluster is unreachable.
11+
Cluster administrators can roll back to the OpenShift SDN Container Network Interface (CNI) network plugin by using the offline migration method. During the migration you must manually reboot every node in your cluster. With the offline migration method, there is some downtime, during which your cluster is unreachable.
1212

1313
[IMPORTANT]
1414
====
@@ -66,42 +66,66 @@ MCO:: Rolls out an update to the systemd configuration necessary for OpenShift S
6666

6767
. Stop all of the machine configuration pools managed by the Machine Config Operator (MCO):
6868

69-
** Stop the master configuration pool:
69+
** Stop the `master` configuration pool by entering the following command in your CLI:
7070
+
71-
[source,terminal]
71+
[source,terminal,subs="+quotes"]
7272
----
7373
$ oc patch MachineConfigPool master --type='merge' --patch \
7474
'{ "spec": { "paused": true } }'
7575
----
7676

77-
** Stop the worker machine configuration pool:
77+
** Stop the `worker` machine configuration pool by entering the following command in your CLI:
7878
+
79-
[source,terminal]
79+
[source,terminal,subs="+quotes"]
8080
----
8181
$ oc patch MachineConfigPool worker --type='merge' --patch \
8282
'{ "spec":{ "paused": true } }'
8383
----
8484

85-
. To prepare for the migration, set the migration field to `null` by entering the following command:
85+
. To prepare for the migration, set the migration field to `null` by entering the following command in your CLI:
8686
+
87-
[source,terminal]
87+
[source,terminal,subs="+quotes"]
8888
----
8989
$ oc patch Network.operator.openshift.io cluster --type='merge' \
9090
--patch '{ "spec": { "migration": null } }'
9191
----
9292

93-
. To start the migration, set the network plugin back to OpenShift SDN by entering the following commands:
93+
. Check that the migration status is empty for the `Network.config.openshift.io` object by entering the following command in your CLI. Empty command output indicates that the object is not in a migration operation.
9494
+
95-
[source,terminal]
95+
[source,terminal,subs="+quotes"]
96+
----
97+
$ oc get Network.config cluster -o jsonpath='{.status.migration}'
98+
----
99+
100+
. Apply the patch to the `Network.operator.openshift.io` object to set the network plugin back to OpenShift SDN by entering the following command in your CLI:
101+
+
102+
[source,terminal,subs="+quotes"]
96103
----
97104
$ oc patch Network.operator.openshift.io cluster --type='merge' \
98105
--patch '{ "spec": { "migration": { "networkType": "OpenShiftSDN" } } }'
106+
----
107+
+
108+
[IMPORTANT]
109+
====
110+
If you applied the patch to the `Network.config.openshift.io` object before the patch operation finalizes on the `Network.operator.openshift.io` object, the Cluster Network Operator (CNO) enters into a degradation state and this causes a slight delay until the CNO recovers from the degraded state.
111+
====
112+
113+
. Confirm that the migration status of the network plugin for the `Network.config.openshift.io cluster` object is `OpenShiftSDN` by entering the following command in your CLI:
114+
+
115+
[source,terminal,subs="+quotes"]
116+
----
117+
$ oc get Network.config cluster -o jsonpath='{.status.migration.networkType}'
118+
----
99119

120+
. Apply the patch to the `Network.config.openshift.io` object to set the network plugin back to OpenShift SDN by entering the following command in your CLI:
121+
+
122+
[source,terminal,subs="+quotes"]
123+
----
100124
$ oc patch Network.config.openshift.io cluster --type='merge' \
101125
--patch '{ "spec": { "networkType": "OpenShiftSDN" } }'
102126
----
103127

104-
. Optional: You can disable automatic migration of several OVN-Kubernetes capabilities to the OpenShift SDN equivalents:
128+
. Optional: Disable automatic migration of several OVN-Kubernetes capabilities to the OpenShift SDN equivalents:
105129
+
106130
--
107131
* Egress IPs
@@ -111,7 +135,7 @@ $ oc patch Network.config.openshift.io cluster --type='merge' \
111135
+
112136
To disable automatic migration of the configuration for any of the previously noted OpenShift SDN features, specify the following keys:
113137
+
114-
[source,terminal]
138+
[source,terminal,subs="+quotes"]
115139
----
116140
$ oc patch Network.operator.openshift.io cluster --type='merge' \
117141
--patch '{
@@ -141,9 +165,9 @@ where:
141165
* VXLAN port
142166
--
143167
+
144-
To customize either or both of the previously noted settings, customize and enter the following command. If you do not need to change the default value, omit the key from the patch.
168+
To customize either or both of the previously noted settings, customize and enter the following command in your CLI. If you do not need to change the default value, omit the key from the patch.
145169
+
146-
[source,terminal]
170+
[source,terminal,subs="+quotes"]
147171
----
148172
$ oc patch Network.operator.openshift.io cluster --type=merge \
149173
--patch '{
@@ -163,7 +187,7 @@ The UDP port for the VXLAN overlay network. If a value is not specified, the def
163187
--
164188
+
165189
.Example patch command
166-
[source,terminal]
190+
[source,terminal,subs="+quotes"]
167191
----
168192
$ oc patch Network.operator.openshift.io cluster --type=merge \
169193
--patch '{
@@ -206,7 +230,6 @@ do
206230
done
207231
----
208232
209-
210233
. Wait until the Multus daemon set rollout completes. Run the following command to see your rollout status:
211234
+
212235
[source,terminal]
@@ -230,15 +253,15 @@ daemon set "multus" successfully rolled out
230253
--
231254
* Start the master configuration pool:
232255
+
233-
[source,terminal]
256+
[source,terminal,subs="+quotes"]
234257
----
235258
$ oc patch MachineConfigPool master --type='merge' --patch \
236259
'{ "spec": { "paused": false } }'
237260
----
238261

239262
* Start the worker configuration pool:
240263
+
241-
[source,terminal]
264+
[source,terminal,subs="+quotes"]
242265
----
243266
$ oc patch MachineConfigPool worker --type='merge' --patch \
244267
'{ "spec": { "paused": false } }'
@@ -250,9 +273,9 @@ As the MCO updates machines in each config pool, it reboots each node.
250273
By default the MCO updates a single machine per pool at a time, so the time that the migration requires to complete grows with the size of the cluster.
251274
252275
. Confirm the status of the new machine configuration on the hosts:
253-
.. To list the machine configuration state and the name of the applied machine configuration, enter the following command:
276+
.. To list the machine configuration state and the name of the applied machine configuration, enter the following command in your CLI:
254277
+
255-
[source,terminal]
278+
[source,terminal,subs="+quotes"]
256279
----
257280
$ oc describe node | egrep "hostname|machineconfig"
258281
----
@@ -274,7 +297,7 @@ Verify that the following statements are true:
274297
* The value of the `machineconfiguration.openshift.io/currentConfig` field is equal to the value of the `machineconfiguration.openshift.io/desiredConfig` field.
275298
--
276299

277-
.. To confirm that the machine config is correct, enter the following command:
300+
.. To confirm that the machine config is correct, enter the following command in your CLI:
278301
+
279302
[source,terminal]
280303
----
@@ -285,14 +308,14 @@ where `<config_name>` is the name of the machine config from the `machineconfigu
285308

286309
. Confirm that the migration succeeded:
287310

288-
.. To confirm that the network plugin is OpenShift SDN, enter the following command. The value of `status.networkType` must be `OpenShiftSDN`.
311+
.. To confirm that the network plugin is OpenShift SDN, enter the following command in your CLI. The value of `status.networkType` must be `OpenShiftSDN`.
289312
+
290-
[source,terminal]
313+
[source,terminal,subs="+quotes"]
291314
----
292-
$ oc get network.config/cluster -o jsonpath='{.status.networkType}{"\n"}'
315+
$ oc get Network.config/cluster -o jsonpath='{.status.networkType}{"\n"}'
293316
----
294317

295-
.. To confirm that the cluster nodes are in the `Ready` state, enter the following command:
318+
.. To confirm that the cluster nodes are in the `Ready` state, enter the following command in your CLI:
296319
+
297320
[source,terminal]
298321
----
@@ -301,7 +324,7 @@ $ oc get nodes
301324

302325
.. If a node is stuck in the `NotReady` state, investigate the machine config daemon pod logs and resolve any errors.
303326

304-
... To list the pods, enter the following command:
327+
... To list the pods, enter the following command in your CLI:
305328
+
306329
[source,terminal]
307330
----
@@ -327,7 +350,7 @@ machine-config-server-k9rtx 1/1 Running 0 43h
327350
+
328351
The names for the config daemon pods are in the following format: `machine-config-daemon-<seq>`. The `<seq>` value is a random five character alphanumeric sequence.
329352

330-
... To display the pod log for each machine config daemon pod shown in the previous output, enter the following command:
353+
... To display the pod log for each machine config daemon pod shown in the previous output, enter the following command in your CLI:
331354
+
332355
[source,terminal]
333356
----
@@ -338,9 +361,9 @@ where `pod` is the name of a machine config daemon pod.
338361

339362
... Resolve any errors in the logs shown by the output from the previous command.
340363

341-
.. To confirm that your pods are not in an error state, enter the following command:
364+
.. To confirm that your pods are not in an error state, enter the following command in your CLI:
342365
+
343-
[source,terminal]
366+
[source,terminal,subs="+quotes"]
344367
----
345368
$ oc get pods --all-namespaces -o wide --sort-by='{.spec.nodeName}'
346369
----
@@ -349,23 +372,23 @@ If pods on a node are in an error state, reboot that node.
349372

350373
. Complete the following steps only if the migration succeeds and your cluster is in a good state:
351374

352-
.. To remove the migration configuration from the Cluster Network Operator configuration object, enter the following command:
375+
.. To remove the migration configuration from the Cluster Network Operator configuration object, enter the following command in your CLI:
353376
+
354-
[source,terminal]
377+
[source,terminal,subs="+quotes"]
355378
----
356379
$ oc patch Network.operator.openshift.io cluster --type='merge' \
357380
--patch '{ "spec": { "migration": null } }'
358381
----
359382

360-
.. To remove the OVN-Kubernetes configuration, enter the following command:
383+
.. To remove the OVN-Kubernetes configuration, enter the following command in your CLI:
361384
+
362-
[source,terminal]
385+
[source,terminal,subs="+quotes"]
363386
----
364387
$ oc patch Network.operator.openshift.io cluster --type='merge' \
365388
--patch '{ "spec": { "defaultNetwork": { "ovnKubernetesConfig":null } } }'
366389
----
367390

368-
.. To remove the OVN-Kubernetes network provider namespace, enter the following command:
391+
.. To remove the OVN-Kubernetes network provider namespace, enter the following command in your CLI:
369392
+
370393
[source,terminal]
371394
----

networking/openshift_sdn/migrate-to-openshift-sdn.adoc

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -12,7 +12,10 @@ include::snippets/sdn-deprecation-statement.adoc[]
1212

1313
To learn more about OpenShift SDN, read xref:../../networking/openshift_sdn/about-openshift-sdn.adoc#about-openshift-sdn[About the OpenShift SDN network plugin].
1414

15+
// How the migration process works
1516
include::modules/nw-network-plugin-migration-process.adoc[leveloffset=+1]
17+
18+
// Migrating to the OpenShift SDN network plugin
1619
include::modules/nw-ovn-kubernetes-rollback.adoc[leveloffset=+1]
1720

1821
[role="_additional-resources"]

0 commit comments

Comments
 (0)