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:
parent
cd64cbae82
commit
1552019580
1 changed files with 221 additions and 31 deletions
|
|
@ -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 = {
|
||||
|
|
|
|||
Loading…
Reference in a new issue