We're experiencing network interface renaming issu...
# harvester
e
We're experiencing network interface renaming issues with Mellanox AOC-M25G-m4SM NICs on a SuperMicro AS-2124BT-HNTR running Harvester. Interfaces often fail to rename from traditional names like
eth[0-9]
to predictable names like
enp[...]
during boot (likely due to a systemd race condition: https://github.com/systemd/systemd/pull/25221), causing instability on reboots, installations, and updates. Attempts: • Disabled Predictable Network Interface Names by adding
net.ifnames=0
to kernel parameters—(which didn't switch renaming off, where I might have added the parameter incorrectly, and I gave up early as changes wouldn't be permanent per https://docs.harvesterhci.io/v1.3/troubleshooting/os#how-to-permanently-edit-kernel-parameters). • Used udev rules like following to rename interfaces based on MAC addresses—where the udev file is correctly placed but doesn't mitigate the renaming race conditions. `/oem/90_custom.yaml`:
Copy code
name: Harvester Configuration
stages:
    initramfs:
        - [...]
          files:
            - path: /etc/udev/rules.d/70-persistent-net.rules
              permissions: 420
              owner: 0
              group: 0
              content: |
                SUBSYSTEM="net", ACTION=="add", DRIVERS="?*", ATTR{address}=="00:00:00:00:00:01", NAME="enp33s0f0np0"
                [...]
              encoding: ""
              ownerstring: ""
            - [...]
Workaround: Added and modified bond configuration to include interfaces whether they're named traditionally or predictably, i.e.. added
BONDING_SLAVE_0='eth0'
and
BONDING_SLAVE_1='enp33s0f0np0'
from what was only
BONDING_SLAVE_0='enp33s0f0np0'
, added configuration for file
/etc/sysconfig/network/ifcfg-eth0
next to what was only configuration for file
/etc/sysconfig/network/ifcfg-enp33s0f0np0
for that respective NIC:
Copy code
name: Harvester Configuration
stages:
    initramfs:
        - [...]
            - path: /etc/wicked/scripts/setup_bond.sh
              [...]
            - path: /etc/sysconfig/network/ifcfg-mgmt-bo
              permissions: 384
              owner: 0
              group: 0
              content: |+
                STARTMODE='onboot'
                BONDING_MASTER='yes'
                BOOTPROTO='none'
                POST_UP_SCRIPT="wicked:setup_bond.sh"


                BONDING_SLAVE_0='eth0'
                BONDING_SLAVE_1='enp33s0f0np0'
                BONDING_SLAVE_2='eth2'
                BONDING_SLAVE_3='enp34s0f0np0'

                BONDING_MODULE_OPTS='miimon=100 mode=802.3ad '

                DHCLIENT_SET_DEFAULT_ROUTE='no'

              encoding: ""
              ownerstring: ""
            - path: /etc/sysconfig/network/ifcfg-eth0
              permissions: 384
              owner: 0
              group: 0
              content: |
                STARTMODE='hotplug'
                BOOTPROTO='none'
              encoding: ""
              ownerstring: ""
            - path: /etc/sysconfig/network/ifcfg-enp33s0f0np0
              permissions: 384
              owner: 0
              group: 0
              content: |
                STARTMODE='hotplug'
                BOOTPROTO='none'
              encoding: ""
              ownerstring: ""
            - path: /etc/sysconfig/network/ifcfg-eth2
              [...]
            - path: /etc/sysconfig/network/ifcfg-enp34s0f0np0
              [...]
            - path: /etc/wicked/scripts/setup_bridge.sh
              [...]
            - path: /etc/sysconfig/network/ifcfg-mgmt-br
              [...]
            - path: /etc/sysconfig/network/ifcfg-mgmt-br.10
              [...]
            - path: /etc/sysconfig/network/ifroute-mgmt-br.10
              [...]
          [...]
This way, the bond functions regardless of how interfaces are named at boot. This workaround works because we're using bonds. The renaming issue might be related to https://github.com/harvester/harvester/issues/2084.