Skip to content

Draft: Try libvirt-metal with vlanif primary interface

What does this MR do and why?

Using the evolution for libvirt-metal introducing bonded interface, in sylva-projects/sylva-elements/container-images/libvirt-metal!42.

It proposes capm3-virt envs on libvirt-metal infra use vlanif as primary interface and active-backup bond mode.

Own notes:

  • tried ip link add/del workaround to get bond0.100 up for Ubuntu images (!2153 (comment 1948470371)) but it did not help;


    Issue on Ubuntu images: bond0.100 does not come up. What we know:

    • noticed that changing /etc/netplan/50-cloud-init.yaml will not reflect in bond config, was trying to change
      bonds:
         bond0:
             parameters:
                 mii-monitor-interval: 1000 # from 100, to reduce the sensitivity to brief link status changes

    after noticing some possible link flaps in dmesg:

    [52171.528227] bond0: (slave ens5): link status definitely down, disabling slave
    [52171.528249] bond0: now running without any active interface!
    [52171.528286] bond0: (slave ens4): link status definitely down, disabling slave
    [52171.561796] 8021q: adding VLAN 0 to HW filter on device ens5
    [52171.561968] 8021q: adding VLAN 0 to HW filter on device ens4
    [52171.632301] bond0: (slave ens5): link status definitely up, 0 Mbps full duplex
    [52171.632312] bond0: (slave ens5): making interface the new active one
    [52171.632613] bond0: active interface up!
    [52171.632653] bond0: (slave ens4): link status definitely up, 0 Mbps full duplex
    [52681.056268] bond0: (slave ens5): link status definitely down, disabling slave
    [52681.056279] bond0: (slave ens4): making interface the new active one
    [52681.140252] 8021q: adding VLAN 0 to HW filter on device ens5
    [52681.140585] 8021q: adding VLAN 0 to HW filter on device ens4
    [52681.160295] bond0: (slave ens5): link status definitely up, 0 Mbps full duplex
    [52681.264332] bond0: (slave ens5): link status definitely down, disabling slave
    [52681.282691] 8021q: adding VLAN 0 to HW filter on device ens5
    [52681.368295] bond0: (slave ens5): link status definitely up, 0 Mbps full dupl

    due to netplan bug https://bugs.launchpad.net/ubuntu/+source/nplan/+bug/1746419, found through https://askubuntu.com/a/1216635/1178214, for which ip link del dev bond0 && netplan apply as root helped (cat /proc/net/bonding/bond0 showed then the new MII Polling Interval (ms): 1000)

    • Francois found that
    $ ip link add link bond0 name bond0.100 type vlan id 100
    $ ip link del bond0.100
    $ netplan apply

    or

    $ sed -i 's/ens4/enp0s4/g' /etc/netplan/50-cloud-init.yaml
    $ sed -i 's/ens5/enp0s5/g' /etc/netplan/50-cloud-init.yaml
    $ reboot

    ran manually on a libvirt-metal Ubuntu VM where the issue happens are successful workarounds.


  • was using remote values for openSUSE in sylva-projects/sylva-elements/ci-tooling/ci-deployment-values!5 (diffs) to set capm3.bondXmitHashPolicy: layer2 for openSUSE-based deployments (still use default capm3.bondXmitHashPolicy: layer3+4 for Ubuntu), but moved to having layer2 for both.

Related reference(s)

Test coverage

Edited by Bogdan-Adrian Burciu

Merge request reports