[systemd-devel] Udev won't rename interfaces that are already UP

Tom Gundersen teg at jklm.no
Thu Feb 19 04:50:10 PST 2015


On 19 Feb 2015 12:21, "Giancarlo Razzolini" <grazzolini at gmail.com> wrote:
>
> On 19-02-2015 08:50, Tom Gundersen wrote:
> > Yeah, this is something we have kept in mind with our own config files
> > (in networkd in particular). We have an elaborate matching logic
> > precisely because we want config files to be reusable to the greatest
> > degree possible. It probably works for you by just making sure the
> > naming scheme for your links is the same on all your machines (or
> > maybe your machines just give that to you for free because you are
> > lucky), but in general that is not powerful enough and not reliable
> > enough.
> It wasn't my intention for the discussion to go off topic. I,
> personally, don't like the predictable (or deterministic) naming system
> very much. But it is way better than ending up with interface switches.
> I would love to see a naming system that not only is predictable but it
> would make better interface names. As it is the case with the BSD's.
> More specifically, OpenBSD. Their naming system based on the driver
> being used by the network card is simple, elegant and clean. I wonder if
> this would be hard to implement.

Won't work. Imagine you have two cards with the same driver. Now you are
back to having to number the cards. And that is what open BSD does: numbers
the cards based on probe order. The probe order is  nondeterministic so you
are not guaranteed the same order and hence the same name on every boot.

In general any name that may be affected by other cards on the machine
won't work as there is no way to know what cards will be present, nor the
order in which they appear. So you can name your card based on properties
of the card or properties of its parents, but that's about it.

> Of course the better way would be for
> it to go into the kernel, not systemd.

We have infrastructure in the kernel for informing us that it already
picked a good name, so if you come up with a nice kernel scheme you could
indicate to us that we should back off. Please make it deterministic
though...

Cheers,

Tom
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.freedesktop.org/archives/systemd-devel/attachments/20150219/8ba30f9a/attachment.html>


More information about the systemd-devel mailing list