// 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-migration_{context}"]
= Beginning the MTU migration

[role="_abstract"]
Start the maximum transmission unit (MTU) migration by specifying the migration configuration for the cluster network and machine interfaces. The Machine Config Operator performs a rolling reboot of the nodes to prepare the cluster for the MTU change.

.Procedure

. To begin the MTU migration, specify the migration configuration by entering the following command. The Machine Config Operator performs a rolling reboot of the nodes in the cluster in preparation for the MTU change.
+
[source,terminal]
----
$ oc patch Network.operator.openshift.io cluster --type=merge --patch \
  '{"spec": { "migration": { "mtu": { "network": { "from": <overlay_from>, "to": <overlay_to> } , "machine": { "to" : <machine_to> } } } } }'
----
+
--
where:

`<overlay_from>`:: Specifies the current cluster network MTU value.
`<overlay_to>`:: Specifies the target MTU for the cluster network. This value is set relative to the value of `<machine_to>`. For OVN-Kubernetes, this value must be `100` less than the value of `<machine_to>`.
`<machine_to>`:: Specifies the MTU for the primary network interface on the underlying host network.
--
+
ifndef::outposts[]
[source,terminal]
----
$ oc patch Network.operator.openshift.io cluster --type=merge --patch \
  '{"spec": { "migration": { "mtu": { "network": { "from": 1400, "to": 9000 } , "machine": { "to" : 9100} } } } }'
----
endif::outposts[]
ifdef::outposts[]
[source,terminal]
----
$ oc patch Network.operator.openshift.io cluster --type=merge --patch \
  '{"spec": { "migration": { "mtu": { "network": { "from": 1400, "to": 1000 } , "machine": { "to" : 1100} } } } }'
----
endif::outposts[]

. As the Machine Config Operator updates machines in each machine config pool, the Operator reboots each node 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`.
+
[NOTE]
====
By default, the Machine Config Operator updates one machine per pool at a time, causing the total time the migration takes to increase with the size of the cluster.
====

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::[]