Skip to content

Commit 138321b

Browse files
committed
OCPBUGS#5449: Change the cluster MTU
1 parent 60f33d9 commit 138321b

File tree

1 file changed

+17
-121
lines changed

1 file changed

+17
-121
lines changed

modules/nw-cluster-mtu-change.adoc

Lines changed: 17 additions & 121 deletions
Original file line numberDiff line numberDiff line change
@@ -91,165 +91,61 @@ where:
9191
`<node_name>`:: Specifies the name of a node in your cluster.
9292
--
9393

94-
... To find the connection profile that NetworkManager created for the interface name returned from the previous command, enter the following command:
95-
+
96-
[source,terminal]
97-
----
98-
$ oc debug node/<node_name> -- chroot /host nmcli c | grep <interface>
99-
----
100-
+
101-
--
102-
where:
103-
104-
`<interface>`:: Specifies the name of the primary network interface.
105-
--
106-
+
107-
.Example output for OpenShift SDN
108-
[source,text]
109-
----
110-
Wired connection 1 46da4a6a-xxxx-xxxx-xxxx-ac0ca900f213 ethernet ens3
111-
----
112-
+
113-
.Example output for OVN-Kubernetes without an original connection configuration
114-
[source,text]
115-
----
116-
ovs-if-phys0 353774d3-0d3d-4ada-b14e-cd4d8824e2a8 ethernet ens4
117-
ovs-port-phys0 332ef950-b2e5-4991-a0dc-3158977c35ca ovs-port ens4
118-
----
119-
+
120-
--
121-
For the OVN-Kubernetes network plugin, two or three connection manager profiles are returned.
122-
123-
* If the previous command returns only two profiles, then you must use a default NetworkManager connection configuration as a template.
124-
* If the previous command returns three profiles, use the profile that is not named `ovs-if-phys0` or `ovs-port-phys0` as a template for the following modifications.
125-
--
126-
127-
... To get the file name of the NetworkManager connection configuration for the primary network interface, enter the following command:
128-
+
129-
[source,terminal]
130-
----
131-
$ oc debug node/<node_name> -- chroot /host nmcli -g UUID,FILENAME c show | grep <uuid> | cut -d: -f2
132-
----
133-
+
134-
--
135-
where:
136-
137-
`<node_name>`:: Specifies the name of a node in your cluster.
138-
`<uuid>`:: Specifies the UUID of the NetworkManager connection profile.
139-
--
140-
+
141-
.Example output
142-
[source,text]
143-
----
144-
/run/NetworkManager/system-connections/Wired connection 1.nmconnection
145-
----
146-
147-
... To copy the NetworkManager connection configuration from the node, enter the following command:
148-
+
149-
[source,terminal]
150-
----
151-
$ oc debug node/<node_name> -- chroot /host cat "<profile_path>" > config.nmconnection
152-
----
153-
+
154-
--
155-
where:
156-
157-
`<node_name>`:: Specifies the name of a node in your cluster.
158-
`<profile_path>`:: Specifies the file system path of the NetworkManager connection from the previous step.
159-
--
94+
... Create the following NetworkManager configuration in the `<interface>-mtu.conf` file:
16095
+
16196
.Example NetworkManager connection configuration
16297
[source,ini]
16398
----
164-
[connection]
165-
id=Wired connection 1
166-
uuid=3e96a02b-xxxx-xxxx-ad5d-61db28678130
167-
type=ethernet
168-
autoconnect-priority=-999
169-
interface-name=enp1s0
170-
permissions=
171-
timestamp=1644109633
172-
173-
[ethernet]
174-
mac-address-blacklist=
175-
176-
[ipv4]
177-
dns-search=
178-
method=auto
179-
180-
[ipv6]
181-
addr-gen-mode=stable-privacy
182-
dns-search=
183-
method=auto
184-
185-
[proxy]
186-
187-
[.nmmeta]
188-
nm-generated=true
99+
[connection-<interface>-mtu]
100+
match-device=interface-name:<interface>
101+
ethernet.mtu=<mtu>
189102
----
190-
191-
... Edit the NetworkManager configuration file saved in the `config.nmconnection` file from the previous step:
192103
+
193104
--
194-
**** Set the following values:
195-
***** `802-3-ethernet.mtu`: Specify the MTU for the primary network interface of the system.
196-
***** `connection.interface-name`: Optional: Specify the network interface name that this configuration applies to.
197-
***** `connection.autoconnect-priority`: Optional: Consider specifying an integer priority value above `0` to ensure this profile is used over other profiles for the same interface. If you are using the OVN-Kubernetes network plugin, this value must be less than `100`.
198-
**** Remove the `connection.uuid` field.
199-
**** Change the following values:
200-
***** `connection.id`: Optional: Specify a different NetworkManager connection profile name.
105+
where:
106+
107+
`<mtu>`:: Specifies the new hardware MTU value.
108+
`<interface>`:: Specifies the primary network interface name.
201109
--
202-
+
203-
.Example NetworkManager connection configuration
204-
[source,ini]
205-
----
206-
[connection]
207-
id=Primary network interface
208-
type=ethernet
209-
autoconnect-priority=10
210-
interface-name=enp1s0
211-
[802-3-ethernet]
212-
mtu=8051
213-
----
214110

215111
... Create two `MachineConfig` objects, one for the control plane nodes and another for the worker nodes in your cluster:
216112

217113
.... Create the following Butane config in the `control-plane-interface.bu` file:
218114
+
219-
[source,yaml]
115+
[source,yaml, subs="attributes+"]
220116
----
221117
variant: openshift
222-
version: 4.12.0
118+
version: {product-version}.0
223119
metadata:
224120
name: 01-control-plane-interface
225121
labels:
226122
machineconfiguration.openshift.io/role: master
227123
storage:
228124
files:
229-
- path: /etc/NetworkManager/system-connections/<connection_name> <1>
125+
- path: /etc/NetworkManager/conf.d/99-<interface>-mtu.conf <1>
230126
contents:
231-
local: config.nmconnection <2>
127+
local: <interface>-mtu.conf <2>
232128
mode: 0600
233129
----
234130
<1> Specify the NetworkManager connection name for the primary network interface.
235131
<2> Specify the local filename for the updated NetworkManager configuration file from the previous step.
236132

237133
.... Create the following Butane config in the `worker-interface.bu` file:
238134
+
239-
[source,yaml]
135+
[source,yaml, subs="attributes+"]
240136
----
241137
variant: openshift
242-
version: 4.12.0
138+
version: {product-version}.0
243139
metadata:
244140
name: 01-worker-interface
245141
labels:
246142
machineconfiguration.openshift.io/role: worker
247143
storage:
248144
files:
249-
- path: /etc/NetworkManager/system-connections/<connection_name> <1>
145+
- path: /etc/NetworkManager/conf.d/99-<interface>-mtu.conf <1>
250146
contents:
251-
local: config.nmconnection <2>
252-
mode: 0644
147+
local: <interface>-mtu.conf <2>
148+
mode: 0600
253149
----
254150
<1> Specify the NetworkManager connection name for the primary network interface.
255151
<2> Specify the local filename for the updated NetworkManager configuration file from the previous step.

0 commit comments

Comments
 (0)