Watch
0
0
Fork
You've already forked hyperhive
0

fix(matrix): queue tuwunel's start after the guest's boot is over

The deferred starter was a oneshot that ran `systemctl start --no-block
tuwunel` inside the boot transaction. A --no-block start still queues a
start job, so the guest's job queue stayed non-empty for as long as
tuwunel's start took, and the container (Type=notify, --notify-ready=yes,
one minute) never reported ready and was killed at its limit.

The starter is now Type=simple, so its own start job ends at the fork. It
waits for `systemctl is-system-running --wait` and only then queues the
service. The VM test waits for the daemon to reach `activating` instead of
asserting it the moment the container's start ends.
This commit is contained in:
maia 2026-11-28 05:57:08 +01:00 • committed by mara
commit 3919de6358

View file

@ -104,8 +104,12 @@ pkgs.testers.runNixOSTest {
out = host.succeed("journalctl -u container@new.service --no-pager -o cat")
assert "start operation timed out" not in out, out
host.succeed("systemctl is-active container@new.service")
state = inside("new", "systemctl show -p ActiveState --value slow.service")
assert state == "activating", state
# The guest queues the daemon's start job once its boot is over, which is
# just after the container's start ends.
host.wait_until_succeeds(
"test \"$(nixos-container run new -- systemctl show -p ActiveState --value slow.service)\" = activating",
timeout=60,
)
with subtest("the dependant fails while the daemon starts"):
assert inside("new", "systemctl show -p ActiveState --value client.service") != "active"