start tuwunel after the container is up, under its own 30 min limit
This commit is contained in:
parent
7ae1b42fd9
commit
ba0f9c6264
1 changed files with 220 additions and 3 deletions
|
|
@ -969,6 +969,11 @@ in
|
|||
services.hyperhive.swarmContainer = {
|
||||
inherit privateNetwork;
|
||||
writesOwnResolvConf = false;
|
||||
# The container's start limit is one minute and tuwunel's start
|
||||
# replays the write-ahead log, which RocksDB redoes from the start
|
||||
# at every open: a start killed before it ends makes no progress.
|
||||
# tuwunel starts after the container is up, under its own limit.
|
||||
startAfterReady = [ "tuwunel" ];
|
||||
};
|
||||
|
||||
# Swarm-internal trust reaches tuwunel at RUNTIME, not via
|
||||
|
|
@ -1102,6 +1107,13 @@ in
|
|||
# Upstream's `ProtectSystem = "strict"` leaves `/run` read-only.
|
||||
systemd.services.tuwunel.serviceConfig.ReadWritePaths = [ socketDir ];
|
||||
|
||||
# tuwunel asks systemd for 30 s more every 15 s while it opens the
|
||||
# database (`EXTEND_TIMEOUT_USEC`), which moves the deadline past
|
||||
# this value for as long as it reports; this is the limit when it does
|
||||
# not. 30 min is ten times the 3 min of CPU a replay has already used
|
||||
# without ending.
|
||||
systemd.services.tuwunel.serviceConfig.TimeoutStartSec = "30min";
|
||||
|
||||
# The probe's file lives in upstream's `RuntimeDirectory`.
|
||||
systemd.services.tuwunel.serviceConfig.ExecStartPre =
|
||||
(fallocateProbe.serviceConfig "/var/lib/${stateName}").ExecStartPre;
|
||||
|
|
|
|||
Loading…
Reference in a new issue