Watch
0
0
Fork
You've already forked hyperhive
0

egress-pin: a hung pass fails instead of stopping every later pass

The lock wait polls try_lock and gives up at the pass deadline (30 s), nft, ip
and nsenter get 10 s each before they are killed, and both pin units get
TimeoutStartSec=90s, which systemd does not set for a oneshot unit.
This commit is contained in:
maia 2026-11-19 20:03:14 +01:00 • committed by mara
commit 1552019580
2 changed files with 221 additions and 31 deletions

View file

@ -64,6 +64,11 @@ let
pkgs.iproute2
pkgs.util-linux
];
# systemd gives a oneshot unit no start timeout unless it is set. A pass takes
# the lock for up to 30 s and runs each child for up to 10 s (hive-priv's
# `egress.rs`); this is above both, and kills a pass that still hangs so the
# timer and udev can start the next.
pinTimeout = "90s";
pinEnvironment = {
HIVE_EGRESS_BRIDGE = br;
}
@ -619,6 +624,7 @@ in
serviceConfig = {
Type = "oneshot";
ExecStart = pinCommand "%i";
TimeoutStartSec = pinTimeout;
};
};
@ -634,6 +640,7 @@ in
serviceConfig = {
Type = "oneshot";
ExecStart = pinCommand "";
TimeoutStartSec = pinTimeout;
};
};
systemd.timers.hive-egress-pin = {

View file

@ -1756,6 +1756,15 @@ let
&& !(centralToggleOff.systemd.services ? "hive-egress-pin@")
&& !(centralToggleOff.systemd ? timers && centralToggleOff.systemd.timers ? hive-egress-pin);
}
{
# systemd gives a oneshot unit no start timeout unless one is set, and a
# pass that hangs holds the lock every later pass waits for. 90 s is above
# the 30 s a pass waits for the lock plus the 10 s each child may run.
name = "a hung egress-pin pass is killed after 90 seconds, in the per-port unit and the sweeper alike";
ok =
bare.systemd.services."hive-egress-pin@".serviceConfig.TimeoutStartSec == "90s"
&& bare.systemd.services.hive-egress-pin.serviceConfig.TimeoutStartSec == "90s";
}
{
# `accept` renders the table without the forward chain and without the
# log prefix; the input chain is the presence arm that the text it