Support MTU configuration on bare-metal workload cluster node interfaces used by Multus CNIs

In the context of CAPM3 network refactoring there is no mechanism to set the MTU (Maximum Transmission Unit) on interfaces used as master in multus NetworkAttachmentDefinition. These interfaces don't need any IP address configuration, so are not handled in the MTU logic from CAPM3 network refactoring in which MTU is inherited from the networks mtu setting.

This can lead to issues when working with macvlan, ipvlan, bridge CNI in case an MTU higher than default is needed.

Admins should be able to define the MTU for bare-metal node interfaces used by Multus.

Example of definition in which the workload cluster only has the primary network on bond0.100 interface, but also needs two interfaces bond1.150 and bond1.200 which will be masters for macvlan NetworkAttachmentDefinitions, each interface having different MTU settings:

capm3:
  networks:
    primary:
      subnet: 192.168.100.0/24
      start: 192.168.100.100
      end: 192.168.100.120
      gateway: 192.168.100.1
      interface: bond0.100
machine_deployments:
  md0:
    network_interfaces:
      bond0:
        type: bond
        interfaces:
          - eno12399np0
          - eno12409np1
        vlans:
          - id: 100
      enp152s0f0np0:
        type: phy
      enp152s0f1np1:
        type: phy
      bond1:
        type: bond
        interfaces:
          - enp152s0f0np0
          - enp152s0f1np1
        vlans:
          - id: 150
            mtu: 4500
          - id: 200
            mtu: 9000

Note: in the setup above, bond1 and its members(enp152s0f0np0 and enp152s0f1np1) would need to have mtu 9000 to fulfill the need of interface bond1.200 (the interface having the highest MTU).

Assignee Loading
Time tracking Loading