nixpkgs icon indicating copy to clipboard operation
nixpkgs copied to clipboard

`systemd-networkd-wait-online` with `networking.useNetworkd` broken as of systemd 253.6

Open winterqt opened this issue 2 years ago • 6 comments

https://github.com/NixOS/nixpkgs/blob/48fecd04896121f8af12ff33754ef251d4ae6318/nixos/modules/tasks/network-interfaces-systemd.nix#L62-L70

This configuration has worked fine until https://github.com/systemd/systemd/commit/2f96a29c2c55bdd67cdd8e0b0cfd6971968e4bca, which now makes it so wait-online will indefinitely hang if no managed interfaces are configured that have RequiredForOnline set, which our default configuration for networking.useNetworkd does not.

@NixOS/systemd (specifically @ElvishJerricco, as the original author of the above configuration), how do we want to handle this?

winterqt avatar Aug 07 '23 00:08 winterqt

I can reproduce

arianvp avatar Aug 07 '23 06:08 arianvp

Yes. It's broken and we also disables this in srvos everywhere: https://github.com/numtide/srvos/blob/85fed23fce8ada8017486090569c0a9054875d5c/nixos/common/networking.nix#L17

Mic92 avatar Aug 07 '23 12:08 Mic92

specifically @ElvishJerricco, as the original author of the above configuration

(FWIW I am not the original author of that code; git blames me because I re-indented it and added a little bit of systemd-initrd logic)

ElvishJerricco avatar Aug 10 '23 20:08 ElvishJerricco

I ran into this with systemd.network.enable without networking.useNetworkd. I had no interfaces configured with networkd. While this isn't a particularly useful configuration, :slightly_smiling_face: it shouldn't cause system activation to hang.

Majiir avatar Oct 05 '23 00:10 Majiir

This will be fixed by #258680, no?

ElvishJerricco avatar Oct 05 '23 01:10 ElvishJerricco

I've just run into this on the latest nixos-unstable, this combination triggers the issue:

networking.useNetworkd = true;
networking.networkmanager.enable = true;

systemd.network.wait-online.anyInterface = true; doesn't help

https://github.com/NixOS/nixpkgs/pull/258680 was reverted in https://github.com/NixOS/nixpkgs/pull/283818

misuzu avatar Mar 05 '24 20:03 misuzu

Related issue: https://github.com/systemd/systemd/issues/25813

akvadrako avatar May 03 '24 07:05 akvadrako