Skip to content

Commit 3c382c4

Browse files
authored
Merge pull request #78460 from JoeAldinger/OSDOCS-34823
OSDOCS-34823: updates migration procedure SDN to OVN-K
2 parents c36919f + f57940e commit 3c382c4

File tree

1 file changed

+50
-2
lines changed

1 file changed

+50
-2
lines changed

modules/nw-ovn-kubernetes-migration.adoc

Lines changed: 50 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -35,7 +35,39 @@ Perform the migration only when an interruption in service is acceptable.
3535
$ oc get Network.config.openshift.io cluster -o yaml > cluster-openshift-sdn.yaml
3636
----
3737

38-
. To prepare all the nodes for the migration, set the `migration` field on the Cluster Network Operator configuration object by entering the following command:
38+
. Verify that the `OVN_SDN_MIGRATION_TIMEOUT` environment variable is set and is equal to `0s` by running the following command:
39+
+
40+
[source,bash]
41+
----
42+
#!/bin/bash
43+
44+
if [ -n "$OVN_SDN_MIGRATION_TIMEOUT" ] && [ "$OVN_SDN_MIGRATION_TIMEOUT" = "0s" ]; then
45+
unset OVN_SDN_MIGRATION_TIMEOUT
46+
fi
47+
48+
#loops the timeout command of the script to repeatedly check the cluster Operators until all are available.
49+
50+
co_timeout=${OVN_SDN_MIGRATION_TIMEOUT:-1200s}
51+
timeout "$co_timeout" bash <<EOT
52+
until
53+
oc wait co --all --for='condition=AVAILABLE=True' --timeout=10s && \
54+
oc wait co --all --for='condition=PROGRESSING=False' --timeout=10s && \
55+
oc wait co --all --for='condition=DEGRADED=False' --timeout=10s;
56+
do
57+
sleep 10
58+
echo "Some ClusterOperators Degraded=False,Progressing=True,or Available=False";
59+
done
60+
EOT
61+
----
62+
63+
. Remove the configuration from the Cluster Network Operator (CNO) configuration object by running the following command:
64+
+
65+
[source,terminal]
66+
----
67+
oc patch Network.operator.openshift.io cluster --type='merge' / --patch '{"spec":{"migration":null}}'
68+
----
69+
70+
. To prepare all the nodes for the migration, set the `migration` field on the CNO configuration object by running the following command:
3971
+
4072
[source,terminal]
4173
----
@@ -48,7 +80,21 @@ $ oc patch Network.operator.openshift.io cluster --type='merge' \
4880
This step does not deploy OVN-Kubernetes immediately. Instead, specifying the `migration` field triggers the Machine Config Operator (MCO) to apply new machine configs to all the nodes in the cluster in preparation for the OVN-Kubernetes deployment.
4981
====
5082

51-
. Optional: You can disable automatic migration of several OpenShift SDN capabilities to the OVN-Kubernetes equivalents:
83+
.. Check that the reboot is finished by running the following command:
84+
+
85+
[source,terminal]
86+
----
87+
$ oc get mcp
88+
----
89+
90+
.. Check that all cluster Operators are available by running the following command:
91+
+
92+
[source,terminal]
93+
----
94+
$ oc get co
95+
----
96+
97+
.. Alternatively: You can disable automatic migration of several OpenShift SDN capabilities to the OVN-Kubernetes equivalents:
5298
+
5399
--
54100
* Egress IPs
@@ -293,6 +339,8 @@ daemon set "multus" successfully rolled out
293339
[IMPORTANT]
294340
====
295341
The following scripts reboot all of the nodes in the cluster at the same time. This can cause your cluster to be unstable. Another option is to reboot your nodes manually one at a time. Rebooting nodes one-by-one causes considerable downtime in a cluster with many nodes.
342+
343+
Cluster Operators will not work correctly before you reboot the nodes.
296344
====
297345

298346
** With the `oc rsh` command, you can use a bash script similar to the following:

0 commit comments

Comments
 (0)