<html>
<head>
<meta http-equiv="content-type" content="text/html; charset=UTF-8">
</head>
<body>
<p>Hello everyone,</p>
<p>So I have around seven Arch Linux based systems.<br>
</p>
<p>All systems have 2 or 3 network cards.<br>
</p>
<p>eth0 is LAN side (192.168.x.x/24 range). eth1 and eth2 has WAN
(public internet) connectivity.</p>
<p>Today I upgraded all systems to systemd 249.3 and Linux kernel
5.13.10.arch1-1.</p>
<p>Everything worked fine before upgrading. And to my horror I
started getting complaints from all sites that internet is not
working.</p>
<p><b>Then I realized that all machines have interface eth1 down.</b></p>
Here is the journal log showing error after upgrading (journalctl -b
0 -u systemd-networkd)
<p>Aug 16 09:30:18 kk systemd[1]: Starting Network Configuration...<br>
Aug 16 09:30:18 kk systemd-networkd[429]: lo: Link UP<br>
Aug 16 09:30:18 kk systemd-networkd[429]: lo: Gained carrier<br>
Aug 16 09:30:18 kk systemd-networkd[429]: Enumeration completed<br>
Aug 16 09:30:18 kk systemd[1]: Started Network Configuration.<br>
<b>Aug 16 09:30:18 kk systemd-networkd[429]: eth1: Interface name
change detected, renamed to eth0.</b><b><br>
</b><b>Aug 16 09:30:18 kk systemd-networkd[429]: Could not process
link message: File exists</b><b><br>
</b><b>Aug 16 09:30:18 kk systemd-networkd[429]: eth0: Failed</b><b><br>
</b>Aug 16 09:30:18 kk systemd-networkd[429]: eth2: Interface name
change detected, renamed to eth1.<br>
Aug 16 09:30:18 kk systemd-networkd[429]: eth0: Interface name
change detected, renamed to tmpeth1.<br>
Aug 16 09:30:18 kk systemd-networkd[429]: eth1: Interface name
change detected, renamed to tmpeth2.<br>
Aug 16 09:30:18 kk systemd-networkd[429]: eth0: Interface name
change detected, renamed to tmpeth0.<br>
Aug 16 09:30:18 kk systemd-networkd[429]: tmpeth0: Interface name
change detected, renamed to eth0.<br>
Aug 16 09:30:18 kk systemd-networkd[429]: tmpeth1: Interface name
change detected, renamed to eth1.<br>
Aug 16 09:30:18 kk systemd-networkd[429]: tmpeth2: Interface name
change detected, renamed to eth2.<br>
Aug 16 09:30:19 kk systemd-networkd[429]: eth0: Link UP<br>
Aug 16 09:30:19 kk systemd-networkd[429]: eth2: Link UP<br>
Aug 16 09:30:19 kk systemd-networkd[429]: eth2: Gained carrier<br>
Aug 16 09:30:22 kk systemd-networkd[429]: eth0: Gained carrier</p>
Explanation about tmpeth* naming is below but that is probably not
related to this issue. So can be ignored.<br>
<p>Notice how there is an error about renaming eth1 to eth0. I dont
know what is doing this renaming of eth1 to eth0. This renaming
didn't happen before upgrade. (see journal log below)<br>
</p>
<p>And also notice that there is no line stating eth1: Link UP.</p>
<p><br>
</p>
<p><b>Here is the journal log when systems worked perfectly.</b><b><br>
</b></p>
<p>Aug 13 09:17:20 kk systemd[1]: Starting Network Service...<br>
Aug 13 09:17:21 kk systemd-networkd[421]: Enumeration completed<br>
Aug 13 09:17:21 kk systemd[1]: Started Network Service.<br>
Aug 13 09:17:21 kk systemd-networkd[421]: eth0: Interface name
change detected, eth0 has been renamed to tmpeth0.<br>
Aug 13 09:17:21 kk systemd-networkd[421]: eth2: Interface name
change detected, eth2 has been renamed to eth0.<br>
Aug 13 09:17:21 kk systemd-networkd[421]: eth0: Interface name
change detected, eth0 has been renamed to tmpeth2.<br>
Aug 13 09:17:21 kk systemd-networkd[421]: eth1: Interface name
change detected, eth1 has been renamed to eth0.<br>
Aug 13 09:17:21 kk systemd-networkd[421]: eth0: Interface name
change detected, eth0 has been renamed to tmpeth1.<br>
Aug 13 09:17:21 kk systemd-networkd[421]: tmpeth1: Interface name
change detected, tmpeth1 has been renamed to eth1.<br>
Aug 13 09:17:21 kk systemd-networkd[421]: tmpeth2: Interface name
change detected, tmpeth2 has been renamed to eth2.<br>
Aug 13 09:17:21 kk systemd-networkd[421]: tmpeth0: Interface name
change detected, tmpeth0 has been renamed to eth0.<br>
Aug 13 09:17:21 kk systemd-networkd[421]: eth1: Link UP<br>
Aug 13 09:17:21 kk systemd-networkd[421]: eth2: Link UP<br>
Aug 13 09:17:21 kk systemd-networkd[421]: eth2: Gained carrier<br>
Aug 13 09:17:21 kk systemd-networkd[421]: eth0: Link UP<br>
Aug 13 09:17:26 kk systemd-networkd[421]: eth0: Gained carrier</p>
<p>Notice how there was no attempt to rename eth1 to eth0 at the
beginning (i.e. when everything worked fine)</p>
<p>And notice how all interfaces showed Link UP.</p>
<p><br>
</p>
<p>So something changed either in systemd or in Linux kernel.</p>
<p>Any idea what is wrong where? And which process is trying to
rename eth1 to eth0 at system startup?<br>
</p>
<p>All systems are production systems and after today's long
downtime, I can not downgrade any system to check what is wrong as
management would be on fire if there is another downtime.<br>
</p>
Thank you in advance,<br>
<p>Amish<br>
</p>
<p><br>
</p>
<p>PS:<br>
</p>
<p>Little about tmpeth* naming.</p>
<p>Some old scripts that we have expect interface names starting
with eth. But those names are not predictable.</p>
So to get predictable names starting with eth*, first I temporarily
rename all interface with tmpeth*. This is done via udev rules.
<p>SUBSYSTEM=="net", ACTION=="add",
ATTR{address}=="XX:XX:XX:XX:XX:XX", NAME="tmpeth0"<br>
SUBSYSTEM=="net", ACTION=="add",
ATTR{address}=="XX:XX:XX:XX:XX:YY", NAME="tmpeth1"<br>
SUBSYSTEM=="net", ACTION=="add",
ATTR{address}=="XX:XX:XX:XX:XX:ZZ", NAME="tmpeth2"<br>
</p>
<p>Then I have a small service (script) which runs before
network-pre.target to convert these names back to eth*<br>
</p>
<p>#search for network interface with name starting from "tmpeth"
and rename them to "eth"<br>
/usr/bin/find /sys/class/net -maxdepth 1 -name "tmpeth[0-9]" -type
l -printf "%f\n" | while read tmpiface; do /usr/bin/ip link set
dev "$tmpiface" name "$(echo $tmpiface | sed s/tmpeth/eth/)"; done</p>
<p>This ensures that I have predictable names starting with eth*.
And it is working fine from 2-3 years. Even with current issue,
name assignment is working fine.<br>
</p>
</body>
</html>