Score:0

lost network interface to systemd-networkd. What is going on?

sd flag
gcb

I have a systemd host with 4 ethernet ports.

one port is reserved for isolated containers. It is set as:

# /etc/systemd/network/20-eth3-reserved.network
[Match]
Name=eth3
[Link]
Unmanaged=yes

I also set aliases for the ports, each on its link file, e.g.

# /etc/systemd/network/12-alias-eth3.link
[Match]
MACAddress=42:42:42:42:42:03
[Link]
Name=eth3

I would later use the unmanaged interface in a systemd-nspawn container with

# /etc/systemd/nspawn/container1.nspawn
...
[Network]
Private=yes
VirtualEthernet=no
Interface=eth3

At some point (Sept) it was working fine. But a few months ago, the interface with unmanaged setting just vanishes from the system.

nspawn fails to bring up the container saying the interface was not found.

ip link shows no eth3, nor the mac address.

lshw weirdly shows all managed ports, but DO NOT list the macaddress (serial field) for the disabled one.

dmesg shows all ports just fine, and list the correct mac address of them all, including disabled one. Later on, it also show the alias being applied!

[Wed Nov 10 11:44:31 2021] igb 0000:03:00.3 eth3: renamed from enps0f4

So systemd does see the device just fine even after the problem started.

networkclt shows all managed ports plus lo as unmanaged. But no sign of eth3.

I don't mind finding the solution to this if there's a better way to 'reserve' a physical interface to be used with nspawn instead of Unmanaged=yes

Score:0
sd flag
gcb

this would all be too funny if it wasn't a sad highlight of the state systemd still is.

The VM wasn't up, or it was and i was trying to start it up again?, regardless of the case machinectl list showed no container up.

The only reason I could find for the interface, which was seen by the kernel, to disappear, was that it was moved to another namespace and that only should happen when nspawn assign the interface to a running container.

But there was no container up, and no way to debug/investigate what happened to it, or to force releases.

And sadly networkctl has even less knowledge of namespaces and cgroups than legacy ps do. If the interface is attached somewhere, it is as good as gone.

In the end I could not figure out what was happening, but a system update and reboot resolved the issue for now.

mangohost

Post an answer

Most people don’t grasp that asking a lot of questions unlocks learning and improves interpersonal bonding. In Alison’s studies, for example, though people could accurately recall how many questions had been asked in their conversations, they didn’t intuit the link between questions and liking. Across four studies, in which participants were engaged in conversations themselves or read transcripts of others’ conversations, people tended not to realize that question asking would influence—or had influenced—the level of amity between the conversationalists.