Page MenuHomePhabricator

Switch to predictable network interface names?
Closed, ResolvedPublic

Description

Starting with stretch, Debian has switched its default to follow upstream systemd's with regards to network interface names. This means that interface names are now by default predictable in the way that can be detailed in systemd's upstream documentation.

This means that interfaces are named by default based on their physical properties (eno1, ens1, enp2s0 etc. for onboard, PCI-Express NICs etc.) rather than unpredictable ethN names. Debian had made ethN less unpredictable by making them "sticky": keeping a list of ethN -> MAC address the first time it saw a MAC address and sticking with it no matter what happened with the other ethN interfaces.

The default can be turned off by passing net.ifnames=0 in the kernel command-line (among other ways) and this is what our current stretch support in puppet has. Changing the default for Wikimedia would mean reverting to systemd's & Debian's default (good) but it would also mean (bad) a) changing our muscle memory b) changing our hardcoded eth0 abstraction in puppet c) having a drift between jessie/trusty & stretch for the next 2-3 years or so.

Should we do this? Thoughts?

Event Timeline

I don't have a strong opinion here, but I'd expect that the Debian-specific sticky rules will be removed at some point in favour of the upstream mechanism and we'll have to migrate at some point anyway. But that's just a gut feeling, I'll reach out to the Debian systemd maintainers to see what their plans are.

The old Debian-specific sticky rules are in fact only supported for the stretch release cycle, the NEWS file for udev explicity calls that existing systems need to be migrated:

If you have ifupdown, firewall, or other configuration that relies on the old names, you need to update
these by Debian 10/Ubuntu 18.04 LTS, and then remove etc/udev/rules.d/70-persistent-net.rules.

After all the patches for T163196, as well as the interface::alias work (Gerrit topic:T163196, topic:interface-alias etc.), the only hardcoded "eth0"s remaining across the tree are P5452 (categorized). There are a few others for eth1/eth2/eth3, but are basically in the same categories (lvs + labstore).

Change 357609 had a related patch set uploaded (by Faidon Liambotis; owner: Faidon Liambotis):
[operations/puppet@production] Switch stretch to predictable network interface names

https://gerrit.wikimedia.org/r/357609

Last call for objections, there is a change staged and its merge is imminent :)

Change 357609 merged by Faidon Liambotis:
[operations/puppet@production] Switch stretch to predictable network interface names

https://gerrit.wikimedia.org/r/357609

Mentioned in SAL (#wikimedia-operations) [2017-06-08T16:33:02Z] <godog> delete net.ifnames for ms-be2001 and ms-be2013 - T158429

I've finished converting ms-be stretch systems to predictable network interfaces, no problems observed so far. For reference the commands:

sed -i 's/net.ifnames=0//g' /etc/default/grub
update-grub
sed -i 's/eth0/eno1/g' /etc/network/interfaces
reboot

The new eth0 is eno1 for 1gbit interface (dell/hp) and eno49 for 10gbit cards (on hp)

faidon claimed this task.

Has been implemented for all hosts starting with stretch and going forward for a long time now!