udev: introduce udev net_id "naming schemes"
authorLennart Poettering <lennart@poettering.net>
Mon, 10 Dec 2018 16:10:19 +0000 (17:10 +0100)
committerZbigniew Jędrzejewski-Szmek <zbyszek@in.waw.pl>
Tue, 11 Dec 2018 22:29:46 +0000 (23:29 +0100)
commitf7e81fd96fdfe0ac6dcdb72de43f7cb4720e363a
tree08094076dc1c03a1be9f10f443445a29cc6808b7
parent912b4547b52f912ddd1fb3ad7c68621b3b8a94a0
udev: introduce udev net_id "naming schemes"

With this we can stabilize how naming works for network interfaces. A
user can request through a kernel cmdline option or an env var which
scheme to follow. The idea is that installers use this to set into stone
(a very soft stone though) the scheme used during installation so that
interface naming doesn't change afterwards anymore.

Why use env vars and kernel cmdline options, and not a config file of
its own?

Well, first of all there's no obvious existing one to use. But more
importantly: I have the feeling that this logic is kind of an incomplete
hack, and I simply don't want to do advertise this as a perfectly
working solution. So far we used env vars for the non-so-official
options and proper config files for the official stuff. Given how
incomplete this logic is (i.e. the big variable for naming remains the
kernel, which might expose sysfs attributes in newer versions that we
check for and didn't exist in older versions — and other problems like
this), I am simply not confident in giving this first-class exposure in
a primary configuration file.

Fixes: #10448
docs/ENVIRONMENT.md
man/kernel-command-line.xml
man/systemd-udevd.service.xml
src/udev/udev-builtin-net_id.c