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

nixos: fix some remaining consequences of network-online.target dep fix #282795

Open
wants to merge 33 commits into
base: master
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
33 commits
Select commit Hold shift + click to select a range
35187f0
nixos/borgbackup: fix under network-online dep fix
lf- Jan 22, 2024
4697f75
nixos/tests: fix systemd-networkd under network-online fix
lf- Jan 22, 2024
6f8433d
nixos/tests: fix kea under network-online fix
lf- Jan 22, 2024
288ec12
nixos/tests: fix systemd-machinectl under network-online dep fix
lf- Jan 22, 2024
d3a0349
nixos/tests: fix rss2email flakiness
lf- Jan 22, 2024
514a606
nixos/tests: fix rsyncd under network-online dep fix
lf- Jan 22, 2024
da9fdd1
nixos/tests: fix systemd-bpf under network-online.target dep fix
lf- Jan 22, 2024
84f6ec6
nixos/iodine: fix test under network-online dep fix
lf- Jan 22, 2024
ae6c49a
nixos/tests: fix flakiness in mediamtx
lf- Jan 22, 2024
2c9a5dd
nixos/tests: fix jool under network-online dep fix
lf- Jan 22, 2024
b5b437e
nixos/tests: fix mystery failure in goss
lf- Jan 22, 2024
a081cf8
nixos/liquidsoap: fix liquidsoap under network-online dep fix
lf- Jan 23, 2024
4d6be37
nixos/mopidy: fix mopidy under network-online dep fix
lf- Jan 23, 2024
bfa13cc
nixos/tts: fix tts under network-online dep fix
lf- Jan 23, 2024
1893853
nixos/wyoming: fix wyoming under network-online dep fix
lf- Jan 23, 2024
5cf6d4f
nixos/netclient: fix service dependencies on network-online
lf- Jan 23, 2024
ad47b1e
nixos/errbot: fix errbot under network-online dep fix
lf- Jan 25, 2024
b2b9687
nixos/tarsnap: fix tarsnap under network-online dep fix
lf- Jan 25, 2024
dc389cc
nixos/prometheus: fix prometheus under network-online dep fix
lf- Jan 25, 2024
853e16e
nixos/sachet: fix sachet under network-online dep fix
lf- Jan 25, 2024
4f5d54a
nixos/kea: fix kea under network-online dep fix
lf- Jan 25, 2024
3fc69ec
nixos/bitwarden-directory-connector-cli: fix bitwarden-directory-conn…
lf- Jan 25, 2024
102df28
nixos/lifecycled: fix lifecycled under network-online dep fix
lf- Jan 25, 2024
7323136
nixos/lifecycled: fix service dependencies
lf- Jan 25, 2024
e2db5a4
nixos/chisel-server: fix service dependencies
lf- Jan 25, 2024
47e8f1a
nixos/pptpd: order after network-online.target
lf- Jan 25, 2024
0182d66
nixos/l2tp: fix service dependencies
lf- Jan 25, 2024
c5f7c29
nixos/amazon-init: add after=network-online.target
lf- Jan 25, 2024
ab7b0a0
nixosTests.jool: fix service dependencies
lf- Jan 25, 2024
a04d708
doc/beam: fix suggested dependencies in the service example
lf- Jan 25, 2024
6be7400
nixos/samba: order after network-online.target
lf- Jan 25, 2024
b91485b
nixos/connman: fix service dependencies
lf- Jan 25, 2024
df51365
nixos/networkmanager: fix service dependencies
lf- Jan 25, 2024
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion doc/languages-frameworks/beam.section.md
Original file line number Diff line number Diff line change
Expand Up @@ -237,7 +237,7 @@ in
{
systemd.services.${release_name} = {
wantedBy = [ "multi-user.target" ];
after = [ "network.target" "postgresql.service" ];
after = [ "network-online.target" "postgresql.service" ];
# note that if you are connecting to a postgres instance on a different host
# postgresql.service should not be included in the requires.
requires = [ "network-online.target" "postgresql.service" ];
Expand Down
1 change: 1 addition & 0 deletions nixos/modules/services/audio/liquidsoap.nix
Original file line number Diff line number Diff line change
Expand Up @@ -10,6 +10,7 @@ let
let stream = builtins.getAttr name config.services.liquidsoap.streams; in
{ inherit name;
value = {
wants = [ "network-online.target" ];
after = [ "network-online.target" "sound.target" ];
description = "${name} liquidsoap stream";
wantedBy = [ "multi-user.target" ];
Expand Down
1 change: 1 addition & 0 deletions nixos/modules/services/audio/mopidy.nix
Original file line number Diff line number Diff line change
Expand Up @@ -76,6 +76,7 @@ in {

systemd.services.mopidy = {
wantedBy = [ "multi-user.target" ];
wants = [ "network-online.target" ];
after = [ "network-online.target" "sound.target" ];
description = "mopidy music player daemon";
serviceConfig = {
Expand Down
1 change: 1 addition & 0 deletions nixos/modules/services/audio/tts.nix
Original file line number Diff line number Diff line change
Expand Up @@ -87,6 +87,7 @@ in
systemd.services = mapAttrs' (server: options:
nameValuePair "tts-${server}" {
description = "Coqui TTS server instance ${server}";
wants = [ "network-online.target" ];
after = [
"network-online.target"
];
Expand Down
1 change: 1 addition & 0 deletions nixos/modules/services/audio/wyoming/faster-whisper.nix
Original file line number Diff line number Diff line change
Expand Up @@ -123,6 +123,7 @@ in
nameValuePair "wyoming-faster-whisper-${server}" {
inherit (options) enable;
description = "Wyoming faster-whisper server instance ${server}";
wants = [ "network-online.target" ];
after = [
"network-online.target"
];
Expand Down
1 change: 1 addition & 0 deletions nixos/modules/services/audio/wyoming/openwakeword.nix
Original file line number Diff line number Diff line change
Expand Up @@ -109,6 +109,7 @@ in
config = mkIf cfg.enable {
systemd.services."wyoming-openwakeword" = {
description = "Wyoming openWakeWord server";
wants = [ "network-online.target" ];
after = [
"network-online.target"
];
Expand Down
1 change: 1 addition & 0 deletions nixos/modules/services/audio/wyoming/piper.nix
Original file line number Diff line number Diff line change
Expand Up @@ -118,6 +118,7 @@ in
nameValuePair "wyoming-piper-${server}" {
inherit (options) enable;
description = "Wyoming Piper server instance ${server}";
wants = [ "network-online.target" ];
after = [
"network-online.target"
];
Expand Down
1 change: 1 addition & 0 deletions nixos/modules/services/backup/borgbackup.nix
Original file line number Diff line number Diff line change
Expand Up @@ -123,6 +123,7 @@ let
};
# if remote-backup wait for network
after = optional (cfg.persistentTimer && !isLocalPath cfg.repo) "network-online.target";
wants = optional (cfg.persistentTimer && !isLocalPath cfg.repo) "network-online.target";
};

# utility function around makeWrapper
Expand Down
1 change: 1 addition & 0 deletions nixos/modules/services/backup/tarsnap.nix
Original file line number Diff line number Diff line change
Expand Up @@ -355,6 +355,7 @@ in

(mapAttrs' (name: cfg: nameValuePair "tarsnap-restore-${name}"{
description = "Tarsnap restore '${name}'";
after = [ "network-online.target" ];
requires = [ "network-online.target" ];

path = with pkgs; [ iputils gcfg.package util-linux ];
Expand Down
1 change: 1 addition & 0 deletions nixos/modules/services/misc/errbot.nix
Original file line number Diff line number Diff line change
Expand Up @@ -88,6 +88,7 @@ in {
"/var/lib/errbot/${name}";
in {
after = [ "network-online.target" ];
wants = [ "network-online.target" ];
wantedBy = [ "multi-user.target" ];
preStart = ''
mkdir -p ${dataDir}
Expand Down
5 changes: 4 additions & 1 deletion nixos/modules/services/misc/lifecycled.nix
Original file line number Diff line number Diff line change
Expand Up @@ -135,7 +135,9 @@ in

systemd.packages = [ pkgs.lifecycled ];
systemd.services.lifecycled = {
wantedBy = [ "network-online.target" ];
after = [ "network-online.target" ];
wants = [ "network-online.target" ];
wantedBy = [ "multi-user.target" ];
restartTriggers = [ configFile ];
};
})
Expand All @@ -153,6 +155,7 @@ in
systemd.timers.lifecycled-queue-cleaner = {
description = "Lifecycle Daemon Queue Cleaner Timer";
wantedBy = [ "timers.target" ];
wants = [ "network-online.target" ];
after = [ "network-online.target" ];
timerConfig = {
Unit = "lifecycled-queue-cleaner.service";
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -55,6 +55,7 @@ in
description = "Alertmanager IRC Relay";

wantedBy = [ "multi-user.target" ];
wants = [ "network-online.target" ];
after = [ "network-online.target" ];

serviceConfig = {
Expand Down
1 change: 1 addition & 0 deletions nixos/modules/services/monitoring/prometheus/sachet.nix
Original file line number Diff line number Diff line change
Expand Up @@ -64,6 +64,7 @@ in

systemd.services.sachet = {
wantedBy = [ "multi-user.target" ];
wants = [ "network-online.target" ];
after = [ "network.target" "network-online.target" ];
script = ''
${pkgs.envsubst}/bin/envsubst -i "${configFile}" > /tmp/sachet.yaml
Expand Down
2 changes: 1 addition & 1 deletion nixos/modules/services/network-filesystems/samba.nix
Original file line number Diff line number Diff line change
Expand Up @@ -216,7 +216,7 @@ in
systemd = {
targets.samba = {
description = "Samba Server";
after = [ "network.target" ];
after = [ "network-online.target" ];
wants = [ "network-online.target" ];
wantedBy = [ "multi-user.target" ];
};
Expand Down
6 changes: 5 additions & 1 deletion nixos/modules/services/networking/chisel-server.nix
Original file line number Diff line number Diff line change
Expand Up @@ -53,7 +53,11 @@ in {
config = mkIf cfg.enable {
systemd.services.chisel-server = {
description = "Chisel Tunnel Server";
wantedBy = [ "network-online.target" ];

wantedBy = [ "multi-user.target" ];
wants = [ "network-online.target" ];

after = [ "network-online.target" ];

serviceConfig = {
ExecStart = "${pkgs.chisel}/bin/chisel server " + concatStringsSep " " (
Expand Down
8 changes: 7 additions & 1 deletion nixos/modules/services/networking/connman.nix
Original file line number Diff line number Diff line change
Expand Up @@ -100,7 +100,13 @@ in {
systemd.services.connman = {
description = "Connection service";
wantedBy = [ "multi-user.target" ];
after = [ "syslog.target" ] ++ lib.optional enableIwd "iwd.service";

# see systemd.special(7): since we are a provider, we pull in
# network.target, while ordered before it.
before = [ "network.target" "NetworkManager-wait-online.service" ];
wants = [ "network.target" ];
after = [ "syslog.target" "network-pre.target" ] ++ lib.optional enableIwd "iwd.service";

requires = lib.optional enableIwd "iwd.service";
serviceConfig = {
Type = "dbus";
Expand Down
14 changes: 12 additions & 2 deletions nixos/modules/services/networking/iodine.nix
Original file line number Diff line number Diff line change
Expand Up @@ -130,7 +130,12 @@ in
createIodineClientService = name: cfg:
{
description = "iodine client - ${name}";
after = [ "network.target" ];

# Seems to save bad network state, breaking it if it is started too
# early relative to the network.
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Was this just always flaky? Or is this breakage new?

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I think this breakage might be new, but I absolutely don't understand why it is happening, given that it is resolved by depending on network-online.target.

wants = [ "network-online.target" ];
after = [ "network-online.target" ];

wantedBy = [ "multi-user.target" ];
script = "exec ${pkgs.iodine}/bin/iodine -f -u ${iodinedUser} ${cfg.extraConfig} ${optionalString (cfg.passwordFile != "") "< \"${builtins.toString cfg.passwordFile}\""} ${cfg.relay} ${cfg.server}";
serviceConfig = {
Expand Down Expand Up @@ -164,7 +169,12 @@ in
) // {
iodined = mkIf (cfg.server.enable) {
description = "iodine, ip over dns server daemon";
after = [ "network.target" ];

# Seems to save bad network state, breaking it if it is started too
# early relative to the network.
wants = [ "network-online.target" ];
after = [ "network-online.target" ];

wantedBy = [ "multi-user.target" ];
script = "exec ${pkgs.iodine}/bin/iodined -f -u ${iodinedUser} ${cfg.server.extraConfig} ${optionalString (cfg.server.passwordFile != "") "< \"${builtins.toString cfg.server.passwordFile}\""} ${cfg.server.ip} ${cfg.server.domain}";
serviceConfig = {
Expand Down
1 change: 1 addition & 0 deletions nixos/modules/services/networking/kea.nix
Original file line number Diff line number Diff line change
Expand Up @@ -283,6 +283,7 @@ in
"network-online.target"
"time-sync.target"
];
wants = [ "network-online.target" ];
wantedBy = [
"kea-dhcp4-server.service"
"kea-dhcp6-server.service"
Expand Down
1 change: 1 addition & 0 deletions nixos/modules/services/networking/netclient.nix
Original file line number Diff line number Diff line change
Expand Up @@ -14,6 +14,7 @@ in
environment.systemPackages = [ cfg.package ];
systemd.services.netclient = {
wantedBy = [ "multi-user.target" ];
wants = [ "network-online.target" ];
after = [ "network-online.target" ];
description = "Netclient Daemon";
serviceConfig = {
Expand Down
10 changes: 8 additions & 2 deletions nixos/modules/services/networking/networkmanager.nix
Original file line number Diff line number Diff line change
Expand Up @@ -550,7 +550,13 @@ in
];

systemd.services.NetworkManager = {
wantedBy = [ "network.target" ];
# see systemd.special(7): since we are a provider, we pull in
# network.target, while ordered before it.
before = [ "network.target" "NetworkManager-wait-online.service" ];
after = [ "network-pre.target" ];
wants = [ "network.target" ];

wantedBy = [ "multi-user.target" ];
restartTriggers = [ configFile ];

aliases = [ "dbus-org.freedesktop.NetworkManager.service" ];
Expand Down Expand Up @@ -582,7 +588,7 @@ in
systemd.services.NetworkManager-ensure-profiles = mkIf (cfg.ensureProfiles.profiles != { }) {
description = "Ensure that NetworkManager declarative profiles are created";
wantedBy = [ "multi-user.target" ];
before = [ "network-online.target" ];
before = [ "network-pre.target" ];
script = let
path = id: "/run/NetworkManager/system-connections/${id}.nmconnection";
in ''
Expand Down
1 change: 1 addition & 0 deletions nixos/modules/services/networking/pptpd.nix
Original file line number Diff line number Diff line change
Expand Up @@ -93,6 +93,7 @@ with lib;
in {
description = "pptpd server";

after = [ "network-online.target" ];
requires = [ "network-online.target" ];
wantedBy = [ "multi-user.target" ];

Expand Down
1 change: 1 addition & 0 deletions nixos/modules/services/networking/xl2tpd.nix
Original file line number Diff line number Diff line change
Expand Up @@ -100,6 +100,7 @@ with lib;
in {
description = "xl2tpd server";

after = [ "network-online.target" ];
requires = [ "network-online.target" ];
wantedBy = [ "multi-user.target" ];

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -260,6 +260,7 @@ in {
timers.bitwarden-directory-connector-cli = {
description = "Sync timer for Bitwarden Directory Connector";
wantedBy = ["timers.target"];
wants = ["network-online.target"];
after = ["network-online.target"];
timerConfig = {
OnCalendar = cfg.interval;
Expand Down
2 changes: 1 addition & 1 deletion nixos/modules/virtualisation/amazon-init.nix
Original file line number Diff line number Diff line change
Expand Up @@ -72,7 +72,7 @@ in {
description = "Reconfigure the system from EC2 userdata on startup";

wantedBy = [ "multi-user.target" ];
after = [ "multi-user.target" ];
after = [ "multi-user.target" "network-online.target" ];
requires = [ "network-online.target" ];

restartIfChanged = false;
Expand Down
8 changes: 7 additions & 1 deletion nixos/tests/goss.nix
Original file line number Diff line number Diff line change
Expand Up @@ -28,7 +28,7 @@ import ./make-test-python.nix ({ pkgs, lib, ... }: {
};
group.root.exists = true;
kernel-param."kernel.ostype".value = "Linux";
service.goss = {
service."systemd-journald" = {
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

why the change from goss to systemd-journald?

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The shape of the failure is goss reporting that some service is not running. journald should be started very very early and is definitely enabled, so this was trying to make the whole thing more deterministic, in case systemd didn't acknowledge goss as running or something. Nevertheless it still would fail without the sleep.

This makes absolutely no sense, because the monitor here is simply invoking systemctl, which, I simply have no idea why it is not working, basically, and why it fixes itself later in boot. This change and the delay should be enough to make this not happen anymore, but I have no idea why it was happening in the first place. https://github.com/goss-org/goss/blob/4e36e8fb52d999e418be7d72f14bad1bfbd65737/system/service_systemd.go#L75

AFAICT this is not my regression, and it at best just exposes a test that was flakey for bizarre reasons already.

enabled = true;
running = true;
};
Expand All @@ -43,8 +43,14 @@ import ./make-test-python.nix ({ pkgs, lib, ... }: {
machine.wait_for_unit("goss.service")
machine.wait_for_open_port(8080)

# due to incomprehensible race conditions, somehow goss fails to get
# answers out of systemctl about systemd-journald being up, despite this
# being more or less impossible.
machine.sleep(5)

with subtest("returns health status"):
result = json.loads(machine.succeed("curl -sS http://localhost:8080/healthz"))
print(result)
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Guessing this print was for development purposes and can be removed? Not that it matters

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Yeah, it was left in so the test is debuggable if it fails in the future, since it doesn't print out the failures.


assert len(result["results"]) == 10, f".results should be an array of 10 items, was {result['results']!r}"
assert result["summary"]["failed-count"] == 0, f".summary.failed-count should be zero, was {result['summary']['failed-count']}"
Expand Down
4 changes: 3 additions & 1 deletion nixos/tests/jool.nix
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,6 @@ let
webserver = ip: msg: {
systemd.services.webserver = {
description = "Mock webserver";
wants = [ "network-online.target" ];
wantedBy = [ "multi-user.target" ];
script = ''
while true; do
Expand Down Expand Up @@ -197,6 +196,9 @@ in

for node in [client, homeserver, server]:
node.wait_for_unit("network-addresses-eth1.service")
# Ensure interfaces come up
node.systemctl("start network-online.target")
node.wait_for_unit("network-online.target")

with subtest("Client can ping the WAN server"):
router.wait_for_unit("jool-nat64-default.service")
Expand Down
1 change: 1 addition & 0 deletions nixos/tests/kea.nix
Original file line number Diff line number Diff line change
Expand Up @@ -178,6 +178,7 @@ import ./make-test-python.nix ({ pkgs, lib, ...}: {
testScript = { ... }: ''
start_all()
router.wait_for_unit("kea-dhcp4-server.service")
client.systemctl("start systemd-networkd-wait-online.service")
client.wait_for_unit("systemd-networkd-wait-online.service")
client.wait_until_succeeds("ping -c 5 10.0.0.1")
router.wait_until_succeeds("ping -c 5 10.0.0.3")
Expand Down
4 changes: 4 additions & 0 deletions nixos/tests/mediamtx.nix
Original file line number Diff line number Diff line change
Expand Up @@ -23,6 +23,8 @@ import ./make-test-python.nix ({ pkgs, lib, ...} :
DynamicUser = true;
Restart = "on-failure";
RestartSec = "1s";
# restart service without going through failed/inactive state that confuses wait_for_unit
RestartMode = "direct";
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I'm curious why it seems to be expected that this service will need to restart, but I suppose it was already like that.

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

It needs to restart because the rtsp stream broker in the middle doesn't have its sockets up immediately, so it will have a few false starts on connecting to the stream broker.

We could probably try harder, but shrug. This works.

TimeoutStartSec = "10s";
ExecStart = "${lib.getBin pkgs.ffmpeg-headless}/bin/ffmpeg -re -f lavfi -i smptebars=size=800x600:rate=10 -c libx264 -f flv rtmp://localhost:1935/test";
};
Expand All @@ -37,6 +39,8 @@ import ./make-test-python.nix ({ pkgs, lib, ...} :
DynamicUser = true;
Restart = "on-failure";
RestartSec = "1s";
# restart service without going through failed/inactive state that confuses wait_for_unit
RestartMode = "direct";
TimeoutStartSec = "10s";
ExecStart = "${lib.getBin pkgs.ffmpeg-headless}/bin/ffmpeg -y -re -i rtmp://localhost:1935/test -f flv /dev/null";
};
Expand Down
3 changes: 2 additions & 1 deletion nixos/tests/rss2email.nix
Original file line number Diff line number Diff line change
Expand Up @@ -60,7 +60,8 @@ import ./make-test-python.nix {
server.wait_for_unit("opensmtpd")
server.wait_for_unit("dovecot2")
server.wait_for_unit("nginx")
server.wait_for_unit("rss2email")
# rss2email finishes its work and then exits, so it may not still be running; thus we just wait till it exits success.
server.wait_until_succeeds("systemctl show rss2email.service | grep Result=success")

server.wait_until_succeeds("check-mail-landed >&2")
'';
Expand Down
7 changes: 7 additions & 0 deletions nixos/tests/rsyncd.nix
Original file line number Diff line number Diff line change
Expand Up @@ -30,6 +30,13 @@ import ./make-test-python.nix ({ pkgs, ... }: {
start_all()
a.wait_for_unit("rsync")
b.wait_for_unit("sockets.target")

# the network has to be "online" for the hosts to be reachable over IP
a.systemctl("start network-online.target")
b.systemctl("start network-online.target")
a.wait_for_unit("network-online.target")
b.wait_for_unit("network-online.target")

b.succeed("rsync a::")
a.succeed("rsync b::")
'';
Expand Down
2 changes: 2 additions & 0 deletions nixos/tests/systemd-bpf.nix
Original file line number Diff line number Diff line change
Expand Up @@ -31,6 +31,8 @@ import ./make-test-python.nix ({ lib, ... }: {

testScript = ''
start_all()
node1.systemctl("start network-online.target")
node2.systemctl("start network-online.target")
node1.wait_for_unit("systemd-networkd-wait-online.service")
node2.wait_for_unit("systemd-networkd-wait-online.service")

Expand Down
3 changes: 2 additions & 1 deletion nixos/tests/systemd-machinectl.nix
Original file line number Diff line number Diff line change
Expand Up @@ -69,7 +69,8 @@ import ./make-test-python.nix ({ pkgs, ... }:

# Test machinectl start
machine.succeed("machinectl start ${containerName}");
machine.wait_until_succeeds("systemctl -M ${containerName} is-active default.target");
machine.wait_until_succeeds("systemctl -M ${containerName} start network-online.target");
machine.wait_until_succeeds("systemctl -M ${containerName} is-active network-online.target");

# Test nss_mymachines without nscd
machine.succeed('LD_LIBRARY_PATH="/run/current-system/sw/lib" getent -s hosts:mymachines hosts ${containerName}');
Expand Down
2 changes: 2 additions & 0 deletions nixos/tests/systemd-networkd.nix
Original file line number Diff line number Diff line change
Expand Up @@ -88,7 +88,9 @@ in import ./make-test-python.nix ({pkgs, ... }: {
};
testScript = ''
start_all()
node1.systemctl("start network-online.target")
node1.wait_for_unit("systemd-networkd-wait-online.service")
node2.systemctl("start network-online.target")
node2.wait_for_unit("systemd-networkd-wait-online.service")

# ================================
Expand Down
Loading