Skip to content
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

networkd being enabled breaks switching to new generation #62

Open
britter opened this issue Nov 18, 2024 · 2 comments
Open

networkd being enabled breaks switching to new generation #62

britter opened this issue Nov 18, 2024 · 2 comments
Assignees
Labels
bug Something isn't working

Comments

@britter
Copy link
Contributor

britter commented Nov 18, 2024

Describe the bug

After updating to rev 505386d I can't nixos-rebuild switch anymore on my laptop. Switch fails with

$ sudo nixos-rebuild switch --flake .
building the system configuration...
activating the configuration...
setting up /etc...
reloading user units for bene...
restarting sysinit-reactivation.target
warning: the following units failed: systemd-networkd-wait-online.service

× systemd-networkd-wait-online.service - Wait for Network to be Configured
     Loaded: loaded (/etc/systemd/system/systemd-networkd-wait-online.service; enabled; preset: enabled)
    Drop-In: /nix/store/bbb5i83nv425cm9r2kadx8mvlglv2vwx-system-units/systemd-networkd-wait-online.service.d
             └─overrides.conf
     Active: failed (Result: exit-code) since Mon 2024-11-18 10:42:18 CET; 58ms ago
       Docs: man:systemd-networkd-wait-online.service(8)
    Process: 64823 ExecStart=/nix/store/h05qs7dk5i6490ji0f9fndia9q2wwjac-systemd-255.9/lib/systemd/systemd-networkd-wait-online --timeout=120 (code=exited, status=1/FAILURE)
   Main PID: 64823 (code=exited, status=1/FAILURE)
         IP: 0B in, 0B out
        CPU: 6ms

Nov 18 10:40:18 pulse-14 systemd[1]: Starting Wait for Network to be Configured...
Nov 18 10:42:18 pulse-14 systemd-networkd-wait-online[64823]: Timeout occurred while waiting for network connectivity.
Nov 18 10:42:18 pulse-14 systemd[1]: systemd-networkd-wait-online.service: Main process exited, code=exited, status=1/FAILURE
Nov 18 10:42:18 pulse-14 systemd[1]: systemd-networkd-wait-online.service: Failed with result 'exit-code'.
Nov 18 10:42:18 pulse-14 systemd[1]: Failed to start Wait for Network to be Configured.
warning: error(s) occurred while switching to the new configuration

I'm think this is related to the change introduced in b4beb32 in combination with cbbb0f7 (the latter fixing the enabled state of the module).

To Reproduce

Not sure it's possible to reproduce it without my machine. I guess you could build a vm from https://github.com/britter/nix-configuration rev aca40ed12989136e8807a2a572cf3c22e199d284. Enabling this configuration fails unless facter.detected.dhcp.enable = false.

Expected behavior
Using facter-modules does not break networking or switching to a new generation.

System information

Additional context

@britter britter added the bug Something isn't working label Nov 18, 2024
britter added a commit to britter/nix-configuration that referenced this issue Nov 18, 2024
@Mic92
Copy link
Member

Mic92 commented Nov 18, 2024

That's actually an issue with networkd. We have disabled the wait-online.target everywhere without having had any downsides: https://github.com/nix-community/srvos/blob/e26a814735f50034e35dff637efad2d502698d09/nixos/common/networking.nix#L16

Not sure if we should do the same here.

@britter
Copy link
Contributor Author

britter commented Nov 18, 2024

Can't tell. I guess you had a reason for enabling it in b4beb32.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

No branches or pull requests

2 participants