-
Notifications
You must be signed in to change notification settings - Fork 373
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Pod and uplink port MTU mismatched after a testbed is changed from encap to noEncap mode #6456
Comments
cc @wenyingd @gran-vmv @hongliangl please check if you have more comments or input for this issue, thanks. |
adding @antoninbas @tnqn for awareness. |
To be clear, I don't think this is specific to FlexibleIPAM. Changing the traffic mode will cause MTU issues in different situations, even when the uplink is not moved to the bridge.
I used a toolbox Pod here to be able to exec into it easily, but the issue will also affect the default coreDNS Pods. Note that the MTU of the Lines 684 to 694 in 5c1141e
Would it be reasonable for each Agent to iterate through all Pod interfaces after initializing the interface store, in order to update the MTU if needed? It should also take care of the uplink case for FlexibleIPAM, as long as the uplink port is created last. |
I am back from my leave so I can handle this if Hongliang is busy with BGP support - @luolanzone @hongliangl |
@antoninbas you can take this one since hongliang is busy on BGP and will take two weeks leave for family. Thanks a lot! |
Thinking about this more, I am not so sure it is a great idea. It is certainly possible, but there is some risk involved and I don't believe other CNIs support this. Instead we can just request the correct MTU when configuring the uplink port. Even if some existing containers are attached to the bridge and have a lower MTU, OVS will still accept the provided MTU. Users are responsible for restarting workloads if they want them to use the correct MTU as well (based on the updated Antrea configuration). We can revisit in the future if there is a user request to automatically update the MTU for existing workloads in case of a configuration change. |
In bridging mode (on Linux), when moving the physical adapter to the bridge, we explictly set the MTU for the bridge port to the same value as for the physical adapter. Without this change, the MTU may default to a different (lower) value if some existing container ports have a lower MTU value. For example, this occurs when first installing Antrea in encap mode, then re-installing Antrea in noEncap mode with bridging mode enabled. We also do some minor documentation updates to indicate to users that they should consider restarting existing workloads when updating the Antrea datapath configuration. Fixes antrea-io#6456 Signed-off-by: Antonin Bas <antonin.bas@broadcom.com>
In bridging mode (on Linux), when moving the physical adapter to the bridge, we explictly set the MTU for the bridge port to the same value as for the physical adapter. Without this change, the MTU may default to a different (lower) value if some existing container ports have a lower MTU value. For example, this occurs when first installing Antrea in encap mode, then re-installing Antrea in noEncap mode with bridging mode enabled. We also do some minor documentation updates to indicate to users that they should consider restarting existing workloads when updating the Antrea datapath configuration. Fixes antrea-io#6456 Signed-off-by: Antonin Bas <antonin.bas@broadcom.com>
In bridging mode (on Linux), when moving the physical adapter to the bridge, we explictly set the MTU for the bridge port to the same value as for the physical adapter. Without this change, the MTU may default to a different (lower) value if some existing container ports have a lower MTU value. For example, this occurs when first installing Antrea in encap mode, then re-installing Antrea in noEncap mode with bridging mode enabled. We also do some minor documentation updates to indicate to users that they should consider restarting existing workloads when updating the Antrea datapath configuration. Fixes antrea-io#6456 Signed-off-by: Antonin Bas <antonin.bas@broadcom.com>
Describe the bug
Recently, a few flexible IPAM e2e tests related with
ping
keep failing on the dedicated testbed. The error is like below:After checking the environment, we found that the test client Pod interface's MTU is
1500
:2: eth0@if1728: <BROADCAST,MULTICAST,UP,LOWER_UP> mtu 1500 qdisc noqueue state UP group default
but the uplink port MTU is 1450:
3008: ens192: <BROADCAST,MULTICAST,UP,LOWER_UP> mtu 1450 qdisc noqueue state UNKNOWN group default qlen 1000
After a few troubleshooting, we found that this dedicated testbed was deployed with encap mode unexpectedly in an e2e tests, then with noEcap + FlexibleIPAM in new tests.
The existing coredns Pod's MTU was configured by Antrea (with Encap mode) to 1450. According to @hongliangl 's comment, Antrea will create uplink port with a minimal MTU in current Node which is 1450 now (because of coredns is already configured as 1450 before). Even the testbed is redeployed with noEncap + flexibleIPAM, the uplink port's MTU will still be 1450, which failed the ping tests.
There are obviously mismatched between Pod's MTU and uplink port's MTU. Considering that we can't stop users to try with Antrea with encap mode first, then reploy the same testbed with Antrea with noEncap + flexibleIPAM, we may need to think about how to reset uplink MTU when the mode is changed, or other enhancement solution to fix the mismatch.
The text was updated successfully, but these errors were encountered: