Comment 10 for bug 1802004

Revision history for this message
Ryan Harper (raharper) wrote : Re: [Bug 1802004] Re: netplan won't apply config on renamed interface

On Mon, Nov 26, 2018 at 12:06 PM Marcos <email address hidden> wrote:
>
> @Ryan: Attached the additional info.
>
> @Mathieu: I confirmed that the first rename comes from systemd... So not
> so weird. Maybe netplan could overcome that to do just one rename, but
> if not, every interface that uses set-name must have at least two
> renames.
>
> ** Attachment added: "Additional logs"
> https://bugs.launchpad.net/netplan/+bug/1802004/+attachment/5216555/+files/debug.zip

Thanks. It appears that the kernel does the initial rename (as
expected) to persistent names.
And then when networkd comes online, the existing
/run/network/10-netplan-eth0.network files
are not considered for "eth0" which is currently named enp0s3; this is
due to the Name=eth0
in the [Match] section of the .network file.

What's unclear is why udev did not enforce the .link files. We've had
a bug open for this...

https://bugs.launchpad.net/netplan/+bug/1770082
https://github.com/systemd/systemd/issues/9006

This is supposedly fixed in systemd-239, and this system is running
systemd-237 which means
that the rename in the .link file is going to be ignored due to
systemd already renaming the
interface once (eth0 -> enp0s3).

As to why things behave differently on different systems, it may have
to do the the devices.
For example if the target nic device does not get a "persistent name"
that differs from the kernel
name, then the existing .network [Match] section will apply and the
configuration
is applied.