diff options
author | Florian Klink <flokli@flokli.de> | 2020-05-01 17:12:05 +0200 |
---|---|---|
committer | Florian Klink <flokli@flokli.de> | 2020-05-01 17:12:05 +0200 |
commit | 15d761a525a025de0680b62e8ab79a9d183f313d (patch) | |
tree | e6ca06e498e26e37c1a5d0f57f74bbb490757730 /nixos/modules/system | |
parent | 448db2eeb93bb48ce95f9f34abcb9e431fbd8b22 (diff) | |
download | nixlib-15d761a525a025de0680b62e8ab79a9d183f313d.tar nixlib-15d761a525a025de0680b62e8ab79a9d183f313d.tar.gz nixlib-15d761a525a025de0680b62e8ab79a9d183f313d.tar.bz2 nixlib-15d761a525a025de0680b62e8ab79a9d183f313d.tar.lz nixlib-15d761a525a025de0680b62e8ab79a9d183f313d.tar.xz nixlib-15d761a525a025de0680b62e8ab79a9d183f313d.tar.zst nixlib-15d761a525a025de0680b62e8ab79a9d183f313d.zip |
Revert "nixos/systemd.nix: don’t require online for multi-user.target"
This reverts commit 764c8203b833176d546395a5c1adf193a9ca73f8. While this is desireable in principle, some of our modules and services fail during service startup if no network is available don't currently properly set Wants=network-online.target. If nothing pulls in this target anymore, systemd won't try to reach it. We have many VM tests waiting for `network-online.target`, and after 764c8203b833176d546395a5c1adf193a9ca73f8 fail with the following error message: ``` error: unit "network-online.target" is inactive and there are no pending jobs ``` Most likely, test scripts shouldn't wait for `network-online.target` in first place (as `network-online.target` says nothing about whether a service has been started), but instead, the script should wait for the network ports of the corresponding service to be open. Let's revert this for now, and re-apply in a draft PR, fixing the tests before merging it back in.
Diffstat (limited to 'nixos/modules/system')
-rw-r--r-- | nixos/modules/system/boot/systemd.nix | 1 |
1 files changed, 1 insertions, 0 deletions
diff --git a/nixos/modules/system/boot/systemd.nix b/nixos/modules/system/boot/systemd.nix index 58e2f9d3bfce..2167df60bc9a 100644 --- a/nixos/modules/system/boot/systemd.nix +++ b/nixos/modules/system/boot/systemd.nix @@ -1033,6 +1033,7 @@ in systemd.services.systemd-journald.stopIfChanged = false; systemd.targets.local-fs.unitConfig.X-StopOnReconfiguration = true; systemd.targets.remote-fs.unitConfig.X-StopOnReconfiguration = true; + systemd.targets.network-online.wantedBy = [ "multi-user.target" ]; systemd.services.systemd-binfmt.wants = [ "proc-sys-fs-binfmt_misc.mount" ]; # Don't bother with certain units in containers. |