Pinning network interfaces results in errors

ememex

New Member
May 2, 2024
2
0
1
Montreal, QC
Hi, I am going through the 8.4.1 to 9.1.x upgrade process and have come across an issue or two with the pve-network-interface-pinning tool. I saw another thread with similar issues, but there was no discussion about the pattern matching errors.

First, as a test run, I executed the command with defaults to see what will happen:

Bash:
# pve-network-interface-pinning generate

This will generate name pinning configuration for all interfaces - continue (y/N)?
y
Name for link 'eno8303' (enp99s0f0) will change to 'nic0'
Name for link 'eno8403' (enp99s0f1) will change to 'nic1'
Name for link 'ens3f0' (enp100s0f0) will change to 'nic2'
Name for link 'ens3f1' (enp100s0f1) will change to 'nic3'
Name for link 'ens3f2' (enp100s0f2) will change to 'nic4'
Name for link 'ens3f3' (enp100s0f3) will change to 'nic5'
Name for link 'eno12399np0' (enp1s0f0np0) will change to 'nic6'
Name for link 'eno12409np1' (enp1s0f1np1) will change to 'nic7'
Name for link 'idrac' will change to 'nic8'
Name for link 'eno12419np2' (enp1s0f2np2) will change to 'nic9'
Name for link 'eno12429np3' (enp1s0f3np3) will change to 'nic10'
Generating link files
Successfully generated .link files in '/usr/local/lib/systemd/network/'
Updating /etc/pve/nodes/pve-04/host.fw.new
Updating /etc/network/interfaces.new
Use of uninitialized value $iface_name in pattern match (m//) at /usr/share/perl5/PVE/CLI/pve_network_interface_pinning.pm line 273.
Use of uninitialized value $iface_name in hash element at /usr/share/perl5/PVE/CLI/pve_network_interface_pinning.pm line 280.
Use of uninitialized value $iface_name in pattern match (m//) at /usr/share/perl5/PVE/CLI/pve_network_interface_pinning.pm line 273.
Use of uninitialized value $iface_name in hash element at /usr/share/perl5/PVE/CLI/pve_network_interface_pinning.pm line 280.
Use of uninitialized value $iface_name in pattern match (m//) at /usr/share/perl5/PVE/CLI/pve_network_interface_pinning.pm line 273.
Use of uninitialized value $iface_name in hash element at /usr/share/perl5/PVE/CLI/pve_network_interface_pinning.pm line 280.
Use of uninitialized value $iface_name in pattern match (m//) at /usr/share/perl5/PVE/CLI/pve_network_interface_pinning.pm line 273.
Use of uninitialized value $iface_name in hash element at /usr/share/perl5/PVE/CLI/pve_network_interface_pinning.pm line 280.
Updating /etc/pve/sdn/controllers.cfg
Successfully updated Proxmox VE configuration files.

Please reboot to apply the changes to your configuration

First question: are those "uninitialized value" messages safe to ignore?

I didn't like the interface naming scheme, so I tried the following (after removing the interfaces.new and *.link files). The tool gave me the same pattern matching errors but seemingly completed the process.

Bash:
# pve-network-interface-pinning generate --interface eno12399np0 --target-name nic2p0

This will generate name pinning configuration for the interface 'eno12399np0' - continue (y/N)? 
y
Name for link 'eno12399np0' (enp1s0f0np0) will change to 'nic2p0'
Generating link files
Successfully generated .link files in '/usr/local/lib/systemd/network/'
Updating /etc/pve/nodes/pve-04/host.fw.new
Updating /etc/network/interfaces.new
Use of uninitialized value $iface_name in pattern match (m//) at /usr/share/perl5/PVE/CLI/pve_network_interface_pinning.pm line 273.
[...] trimmed [...]
Updating /etc/pve/sdn/controllers.cfg
Successfully updated Proxmox VE configuration files.

Please reboot to apply the changes to your configuration

Now for the 2nd port on the same network controller (it's a 4-port Intel E810-XXVDA4). The last line throws (what I presume to be) an error message about a "wrong interface type on slave nic2p0".

Bash:
# pve-network-interface-pinning generate --interface eno12409np1 --target-name nic2p1

This will generate name pinning configuration for the interface 'eno12409np1' - continue (y/N)? 
y
Name for link 'eno12409np1' (enp1s0f1np1) will change to 'nic2p1'
Generating link files
Successfully generated .link files in '/usr/local/lib/systemd/network/'
Updating /etc/pve/nodes/pve-04/host.fw.new
Updating /etc/network/interfaces.new
Use of uninitialized value $iface_name in pattern match (m//) at /usr/share/perl5/PVE/CLI/pve_network_interface_pinning.pm line 273.
[...] trimmed [...]
bond 'bond1' - wrong interface type on slave 'nic2p0' ('unknown' != 'eth or bond')

In contrast, when I tried another naming scheme (pve-network-interface-pinning generate --interface eno12399np0 --target-name en2p0) I didn't receive the "wrong interface type" message. I suspect PVE is looking for a specific interface prefix (en|eth) but I haven't gone through the source code to confirm this.

Second question: do I play it safe and stick with en* prefixes?

Thank you in advance.


Output of udevadm test-builtin net_id /sys/class/net/eno12409np1

Bash:
Trying to open "/etc/systemd/hwdb/hwdb.bin"...
Trying to open "/etc/udev/hwdb.bin"...
Trying to open "/usr/lib/systemd/hwdb/hwdb.bin"...
Trying to open "/lib/systemd/hwdb/hwdb.bin"...
Trying to open "/lib/udev/hwdb.bin"...
=== trie on-disk ===
tool version:          252
file size:        13017119 bytes
header size             80 bytes
strings            2728567 bytes
nodes             10288472 bytes
Loading kernel module index.
Found cgroup2 on /sys/fs/cgroup/, full unified hierarchy
Found container virtualization none.
Using default interface naming scheme 'v252'.
Parsed configuration file "/usr/lib/systemd/network/99-default.link"
Parsed configuration file "/usr/lib/systemd/network/73-usb-net-by-mac.link"
Created link configuration context.
ID_NET_NAMING_SCHEME=v252
eno12409np1: addr_assign_type=3, MAC address is not permanent.
sd-device: Failed to chase symlinks in "/sys/devices/pci0000:00/0000:00:01.1/0000:01:00.1/of_node".
sd-device: Failed to chase symlinks in "/sys/devices/pci0000:00/0000:00:01.1/0000:01:00.1/physfn".
0000:01:00.1: acpi_index=12409
eno12409np1: dev_port=0
eno12409np1: Onboard index identifier: index=12409 phys_port=p1 dev_port=0 → o12409np1
eno12409np1: Onboard label from PCI device: Integrated NIC 1 Port 2-1
eno12409np1: Parsing slot information from PCI device sysname "0000:01:00.1": success
eno12409np1: dev_port=0
eno12409np1: PCI path identifier: domain=0 bus=1 slot=0 func=1 phys_port=p1 dev_port=0 → p1s0f1np1
ID_NET_NAME_ONBOARD=eno12409np1
ID_NET_LABEL_ONBOARD=Integrated NIC 1 Port 2-1
ID_NET_NAME_PATH=enp1s0f1np1
Unload kernel module index.
Unloaded link configuration context.

Output of udevadm test-builtin net_setup_link /sys/class/net/eno12409np1

Bash:
Trying to open "/etc/systemd/hwdb/hwdb.bin"...
Trying to open "/etc/udev/hwdb.bin"...
Trying to open "/usr/lib/systemd/hwdb/hwdb.bin"...
Trying to open "/lib/systemd/hwdb/hwdb.bin"...
Trying to open "/lib/udev/hwdb.bin"...
=== trie on-disk ===
tool version:          252
file size:        13017119 bytes
header size             80 bytes
strings            2728567 bytes
nodes             10288472 bytes
Loading kernel module index.
Found cgroup2 on /sys/fs/cgroup/, full unified hierarchy
Found container virtualization none.
Using default interface naming scheme 'v252'.
Parsed configuration file "/usr/lib/systemd/network/99-default.link"
Parsed configuration file "/usr/lib/systemd/network/73-usb-net-by-mac.link"
Created link configuration context.
eno12409np1: Device has name_assign_type=4
eno12409np1: Device has addr_assign_type=3
ID_NET_DRIVER=ice
eno12409np1: Config file /usr/lib/systemd/network/99-default.link is applied
eno12409np1: Using static MAC address.
eno12409np1: Policy *keep*: keeping existing userspace name
ID_NET_LINK_FILE=/usr/lib/systemd/network/99-default.link
ID_NET_NAME=eno12409np1
Unload kernel module index.
Unloaded link configuration context.

Output of pveversion:
Code:
pve-manager/8.4.14/b502d23c55afcba1 (running kernel: 6.8.12-17-pve)
 
Can you post the output of the following command?
Code:
ip -details -json link show

Can you also post the contents of a generated link file from /usr/local/lib/systemd/network/?

Can you also share your /etc/network/interfaces ?
 
Can you post the output of the following command?
Code:
ip -details -json link show

Can you also post the contents of a generated link file from /usr/local/lib/systemd/network/?

Can you also share your /etc/network/interfaces ?

Certainly; I have attached the output of ip -details -json.

The contents of /usr/local/lib/systemd/network/ are pasted below after running the following commands:

Bash:
pve-network-interface-pinning generate --interface eno12399np0 --target-name nic2p0
pve-network-interface-pinning generate --interface eno12409np1 --target-name nic2p1

INI:
; 50-pve-nic2p0.link
[Match]
MACAddress=30:3e:a7:1a:ce:50
Type=ether

[Link]
Name=nic2p0

; 50-pve-nic2p1.link
[Match]
MACAddress=30:3e:a7:1a:ce:51
Type=ether

[Link]
Name=nic2p1

Contents of /etc/network/interfaces as follows:

Code:
auto lo
iface lo inet loopback

auto ens3f0
iface ens3f0 inet manual

auto eno12419np2
iface eno12419np2 inet manual

auto eno12429np3
iface eno12429np3 inet manual

iface eno8303 inet manual

iface eno8403 inet manual

auto ens3f1
iface ens3f1 inet manual

auto ens3f2
iface ens3f2 inet manual

auto ens3f3
iface ens3f3 inet manual

auto eno12399np0
iface eno12399np0 inet manual

auto eno12409np1
iface eno12409np1 inet manual

auto bond0
iface bond0 inet manual
        bond-slaves ens3f0 ens3f1
        bond-miimon 100
        bond-mode 802.3ad
        bond-xmit-hash-policy layer2+3
#i350-T4

auto bond1
iface bond1 inet manual
        bond-slaves eno12399np0 eno12409np1
        bond-miimon 100
        bond-mode 802.3ad
        bond-xmit-hash-policy layer2+3
#E810 25G

auto bond2
iface bond2 inet manual
        bond-slaves eno12419np2 eno12429np3
        bond-miimon 100
        bond-mode 802.3ad
        bond-xmit-hash-policy layer2+3
#E810 10G

auto bond3
iface bond3 inet manual
        bond-slaves ens3f2 ens3f3
        bond-miimon 100
        bond-mode 802.3ad
        bond-xmit-hash-policy layer2+3
#i350-T4

auto vmbr0
iface vmbr0 inet manual
        bridge-ports bond0
        bridge-stp off
        bridge-fd 0

auto vmbr1
iface vmbr1 inet manual
        bridge-ports bond1
        bridge-stp off
        bridge-fd 0

auto vmbr2
iface vmbr2 inet manual
        bridge-ports bond2
        bridge-stp off
        bridge-fd 0
        bridge-vlan-aware yes
        bridge-vids 2-4094

auto vmbr3
iface vmbr3 inet manual
        bridge-ports bond3
        bridge-stp off
        bridge-fd 0

auto vmbr0.60
iface vmbr0.60 inet static
        address 10.0.60.24/24
        gateway 10.0.60.1
#Management

auto vmbr1.62
iface vmbr1.62 inet static
        address 10.0.62.24/24
#CEPH Internal

auto vmbr2.64
iface vmbr2.64 inet static
        address 10.0.64.24/24
#CEPH Public

auto vmbr3.66
iface vmbr3.66 inet static
        address 10.0.66.24/24
#Corosync

source /etc/network/interfaces.d/*

Here is the diff shown in the web UI. Note: I didn't explicitly configure the 'idrac' interface, so I'm surprised it even appears in the new configuration.

Diff:
--- /etc/network/interfaces    2025-04-16 12:36:37.147410605 -0400
+++ /etc/network/interfaces.new    2025-12-18 13:20:35.091279426 -0500
@@ -34,12 +34,14 @@
 auto ens3f3
 iface ens3f3 inet manual
 
-auto eno12399np0
-iface eno12399np0 inet manual
+auto nic2p0
+iface nic2p0 inet manual
 
 auto eno12409np1
 iface eno12409np1 inet manual
 
+iface idrac inet manual
+
 auto bond0
 iface bond0 inet manual
     bond-slaves ens3f0 ens3f1
@@ -50,7 +52,7 @@
 
 auto bond1
 iface bond1 inet manual
-    bond-slaves eno12399np0 eno12409np1
+    bond-slaves nic2p0 eno12409np1
     bond-miimon 100
     bond-mode 802.3ad
     bond-xmit-hash-policy layer2+3
 

Attachments