systemd/network: set predictable alternative ifnames for virtio#38
Merged
pothos merged 2 commits intoflatcar-masterfrom Mar 15, 2021
Merged
systemd/network: set predictable alternative ifnames for virtio#38pothos merged 2 commits intoflatcar-masterfrom
pothos merged 2 commits intoflatcar-masterfrom
Conversation
The virtio interfaces use unpredictable names like eth0 which is good as long as there is only one interface. In case there are multiple interfaces it makes sense to use predictable names at least as alternative names as way of referring to them.
With the systemd/udev 247 change of bind/unbind the old rule to set ens4v1 as interface name on GCE broke and only eth0 was used now. The old name ens4v1 is not even a current predictable name and the breakage already appeared on Stable but for compatibility we can support this name as alternative interface name instead of maintaining the udev rule. For that, add special networkd link files for GCE.
595b30f to
7e56177
Compare
margamanterola
approved these changes
Mar 15, 2021
Contributor
margamanterola
left a comment
There was a problem hiding this comment.
LGTM.
I find it weird that we need two files for alternate matching, but I did some digging myself and couldn't find a better way either. Thanks!
pothos
added a commit
to flatcar-archive/coreos-overlay
that referenced
this pull request
Mar 15, 2021
This pulls in flatcar/init#38 to set predictable network interface names as alternative interface names for virtio devices, and also add a special hardcoded ens4v1 name for GCE because the special udev rule to rename the device stopped working after the systemd 247 update.
pothos
added a commit
that referenced
this pull request
Mar 15, 2021
systemd/network: set predictable alternative ifnames for virtio
pothos
added a commit
to flatcar-archive/coreos-overlay
that referenced
this pull request
Mar 15, 2021
…flatcar-2765) This pulls in flatcar/init#38 to set predictable network interface names as alternative interface names for virtio devices, and also add a special hardcoded ens4v1 name for GCE because the special udev rule to rename the device stopped working after the systemd 247 update. A branch flatcar-2765 was created in the init repository to backport only this change.
pothos
added a commit
to flatcar-archive/coreos-overlay
that referenced
this pull request
Mar 15, 2021
This pulls in flatcar/init#38 to set predictable network interface names as alternative interface names for virtio devices, and also add a special hardcoded ens4v1 name for GCE because the special udev rule to rename the device stopped working after the systemd 247 update.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
With the systemd/udev 247 change of bind/unbind the old rule to set
ens4v1 as interface name on GCE broke and only eth0 was used now.
The old name ens4v1 is not even a current predictable name and the
breakage already appeared on Stable but for compatibility we can
support this name as alternative interface name instead of
maintaining the udev rule. For that, add special networkd link
files for GCE.
The virtio interfaces use unpredictable names like eth0 which is
good as long as there is only one interface. In case there are multiple
interfaces it makes sense to use predictable names at least as
alternative names as way of referring to them.
Note: Consider to backport this to 2765.
How to use/testing done
Tested with
on QEMU and GCE. The interface name is
eth0and there are two alternative namesensXandenp0sXattached to it (X is 4 for GCE, 3 for QEMU in my case) and the old hardcodedens4v1name.