-
-
Notifications
You must be signed in to change notification settings - Fork 14.7k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
NixOS 19.09 upgrade may change network interface naming #71086
Comments
In my particular case, the name for an Intel Ethernet controller changed from
journal output after the upgrade:
Kernel version was 4.19.79 in both cases. |
See also #71082 |
Let's merge the discussion into a single thread. |
This mentioned issue seems to based on predictable interface names being gone entirely, which is different to this issue about predictable names being, well... unpredictable. I don't think this should be closed. |
Oh, right, that's weird [the other issue]. I'll reopen until it's clearer. EDIT: and you posted a much better description/analysis anyway :-) |
Restating my problem: What I'm describing isn't a bug in NixOS per se, just that NixOS 19.09 updated from systemd 239 to systemd 243 and from time to time, systemd updates bring slight changes to the way network interfaces are named. This may affect certain hardware configurations resulting in network interface names changing, though in the majority of cases nothing will happen. What I'm proposing is that it should be made clear in the release notes, that these changes might occur and to suggest a procedure for admins to be able to check before rebooting and adjust network configuration. This would be most important for servers (without out-of-band management), such as the system on which I first discovered this problem. An alternative solution I propose is to explicitly roll back to the old naming algorithm in the default NixOS configuration to the algorithm from version 239. Although, all this does is delay the inevitable when systemd drops the legacy version of the algorithm, but gives more time to find a solution for a smoother transition. |
I assume we'll go the way of adding a line into the release notes? /cc @disassembler, @lheckemann, @andir. |
Notes on checking if interface name will change: The persistent interface names are documented in systemd.net-naming-scheme(7). You can use
The important setting here is To give an example, here is how the interface on my affected system got changed:
You can see that
we can see that |
The problem with the procedure outlined above is, that only it works since systemd 240, meaning you'd first have to upgrade systemd from 239 in order to see if interface names change and in turn meaning you'd have to upgrade to NixOS 19.09 using |
Well, if we really cared about it, we could theoretically have one release (19.09) with forcing the previous naming by default. The main problem I see with that: it's relatively late, so I'm afraid changing back may cause also issues to some people. A compromise approach could be to make it easily configurable and suggest setting the older scheme manually – even if just for one boot to do this procedure. |
If they keep the old scheme around indefinitely, can't we just set the old one conditional on |
@michaelpj People already might have switched their system and dealt with the changes, so applying any changes to 19.09 in that regard will change their system behaviour again. I think the proper way to address this should be to add this more prominent to the 19.09 release notes, and make sure major systemd changes are mentioned. I'm not talking about copying in all of their release notes, but adding pointers to possibly more invasive changes. |
What about this formulation? #71456 |
I'm fine with that. Thank you. |
For the record, we got bitten by another interface rename (investigation kindly helped by @flokli): https://gist.github.com/nh2/71854c40a1a1a7c15bc8a8105e854f88 We found that our older |
This issue (or one like it) just recurred for me, after a kernel version bump. It appears that Suggested fix:
would also need to be able to refer by MAC address in e.g. This would be substantially more stable for config, given how mutable linux kernel ethernet interface naming scheme has become |
The way to do this is documented in |
Describe the bug
NixOS 19.09 updates systemd from version 239 to version 243 which comes with a changed network device naming algorithm which can result in hosts coming up with different interface names after upgrading NixOS 19.09. In turn, this means previously set up network configuration may no longer apply and thus the host might loose network connectivity.
To Reproduce
Steps to reproduce the behavior:
Of course, step 3 happens depending on whether the new interface naming algorithm decides to generate a new name for the hardware configuration or not.
Expected behavior
I don't have a problem with the interface names changing in itself, just that it should be explicitly considered for the upgrade procedure to NixOS 19.09. For this I can come up with two potential solutions:
Additional context
Luckily, systemd make changes to the interface naming algorithm explicit and keep old versions around for backwards compatibility. Previous versions are documented in systemd.net-naming-scheme(7) and can be configured with the
net-naming-scheme
kernel parameter.Workaround
In case one is affected by the changing network interface name and depends on network connectivity to access a machine (such as a remote server) and doesn't have access to out-of-band management, but has to use a crappy rescue image one can change the interface naming using the kernel command line by
net-naming-scheme=
in/etc/nixos/configuration.nix
:or by doing a quick'n'dirty edit to the grub config at
/boot/grub/grub.cfg
:v239
switches to the version of the algorithm used by the systemd version included in NixOS 19.03.Metadata
Maintainer information:
The text was updated successfully, but these errors were encountered: