// Module included in the following assemblies:
//
// * networking/changing-cluster-network-mtu.adoc
// * installing/installing_aws/aws-compute-edge-zone-tasks.adoc
// * installing/installing_aws/ipi/installing-aws-outposts.adoc

ifeval::["{context}" == "aws-compute-edge-tasks-local-zone"]
:local-zone:
endif::[]
ifeval::["{context}" == "aws-compute-edge-tasks-wavelength-zone"]
:wavelength-zone:
endif::[]
ifeval::["{context}" == "aws-compute-edge-zone-tasks"]
:post-aws-zones:
endif::[]
ifeval::["{context}" == "installing-aws-outposts"]
:outposts:
endif::[]

:_mod-docs-content-type: PROCEDURE
[id="nw-cluster-mtu-finalizing-migration_{context}"]
= Finalizing the MTU migration

[role="_abstract"]
Finalize the MTU migration to apply the new maximum transmission unit (MTU) settings to the OVN-Kubernetes network plugin. This updates the cluster configuration and triggers a rolling reboot of the nodes to complete the process.


.Procedure

. To finalize the MTU migration, enter the following command for the OVN-Kubernetes network plugin:
+
[source,terminal]
----
$ oc patch Network.operator.openshift.io cluster --type=merge --patch \
  '{"spec": { "migration": null, "defaultNetwork":{ "ovnKubernetesConfig": { "mtu": <mtu> }}}}'
----
+
--
where:

`<mtu>`:: Specifies the new cluster network MTU that you specified with `<overlay_to>`.
--

. After finalizing the MTU migration, each machine config pool node is rebooted one by one. You must wait until all the nodes are updated. Check the machine config pool status by entering the following command:
+
[source,terminal]
----
$ oc get machineconfigpools
----
+
A successfully updated node has the following status: `UPDATED=true`, `UPDATING=false`, `DEGRADED=false`.

.Verification

ifdef::local-zone,wavelength-zone,post-aws-zones,outposts[]
* Verify that the node in your cluster uses the MTU that you specified by entering the following command:
+
[source,terminal]
----
$ oc describe network.config cluster
----
endif::local-zone,wavelength-zone,post-aws-zones,outposts[]

ifndef::local-zone,wavelength-zone,post-aws-zones,outposts[]
. To get the current MTU for the cluster network, enter the following command:
+
[source,terminal]
----
$ oc describe network.config cluster
----

. Get the current MTU for the primary network interface of a node:

.. To list the nodes in your cluster, enter the following command:
+
[source,terminal]
----
$ oc get nodes
----

.. To obtain the current MTU setting for the primary network interface on a node, enter the following command:
+
[source,terminal]
----
$ oc adm node-logs <node> -u ovs-configuration | grep configure-ovs.sh | grep mtu | grep <interface> | head -1
----
+
where:
+
--
`<node>`:: Specifies a node from the output from the previous step.
`<interface>`:: Specifies the primary network interface name for the node.
--
+
.Example output
[source,text]
----
ens3: <BROADCAST,MULTICAST,UP,LOWER_UP> mtu 8051
----
endif::local-zone,wavelength-zone,post-aws-zones,outposts[]

ifeval::["{context}" == "aws-compute-edge-tasks-local-zone"]
:!local-zone:
endif::[]
ifeval::["{context}" == "aws-compute-edge-tasks-wavelength-zone"]
:!wavelength-zone:
endif::[]
ifeval::["{context}" == "aws-compute-edge-zone-tasks"]
:!post-aws-zones:
endif::[]
ifeval::["{context}" == "installing-aws-outposts"]
:!outposts:
endif::[]