Browse Source

Allow Pods Network to have smaller MTU than Nodes

We should allow Pods Network MTU to be smaller than the
MTU of the Host VM to address scenarios like Nodes Network
being a provider network, while Pods Network is a Tenant
Network. This commit fixes the issue by allowing binding
of VIFs with MTU smaller than the Nodes.

Change-Id: Ibadcd07824702ff1160a4a1d6d10313c15910dea
changes/14/783914/2
Maysa Macedo 2 months ago
parent
commit
07a3723f20
1 changed files with 4 additions and 4 deletions
  1. +4
    -4
      kuryr_kubernetes/cni/binding/nested.py

+ 4
- 4
kuryr_kubernetes/cni/binding/nested.py View File

@ -109,15 +109,15 @@ class NestedDriver(health.HealthHandler, b_base.BaseBindingDriver,
# driver for getting the link device.
vm_iface_name = self._detect_iface_name(h_ipdb)
mtu = h_ipdb.interfaces[vm_iface_name].mtu
if mtu != vif.network.mtu:
if mtu < vif.network.mtu:
# NOTE(dulek): This might happen if Neutron and DHCP agent
# have different MTU settings. See
# https://bugs.launchpad.net/kuryr-kubernetes/+bug/1863212
raise exceptions.CNIBindingFailure(
f'MTU of interface {vm_iface_name} ({mtu}) does not '
f'match MTU of pod network {vif.network.id} '
f'MTU of interface {vm_iface_name} ({mtu}) is smaller '
f'than MTU of pod network {vif.network.id} '
f'({vif.network.mtu}). Please make sure pod network '
f'has the same MTU as node (VM) network.')
f'has the same or smaller MTU as node (VM) network.')
args = self._get_iface_create_args(vif)
with h_ipdb.create(ifname=temp_name,


Loading…
Cancel
Save