Skip to content

Race condition: interface renaming, udev vs. networkd #7293

@smurfix

Description

@smurfix

Submission type

  • Bug report

systemd version the issue has been seen with

235

Used distribution

Debian, but irrelevant AFAICT

In case of bug report: Expected behaviour you didn't see

I can rename an interface with a udev rule or a .link file

In case of bug report: Unexpected behaviour you saw

networkd is faster and enables the interface before udev gets around to renaming it.
Unfortunately, an interface that's up cannot be renamed

In case of bug report: Steps to reproduce the problem

# cat /etc/systemd/network/10-en0.link:
[Match]
MACAddress=aa:bb:cc:dd:ee:ff

[Link]
MACAddressPolicy=none
Name=en0

Reboot a couple of times. Sometimes the interface is renamed correctly. Sometimes it is not.

Workaround:

# cat systemd-networkd.service.d/after-udev.conf 
[Service]
ExecStartPre=/sbin/udevadm settle

Metadata

Metadata

Assignees

No one assigned

    Labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions