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
|
|
@ -267,7 +267,6 @@ let
|
|||
"grafana.service"
|
||||
"nats.service"
|
||||
"opentelemetry-collector.service"
|
||||
"tuwunel.service"
|
||||
"victorialogs.service"
|
||||
"victoriametrics.service"
|
||||
];
|
||||
|
|
@ -986,6 +985,35 @@ let
|
|||
&& c.timeoutStartSec == "1min"
|
||||
&& startLimitOf "hive-matrix" == 60;
|
||||
}
|
||||
{
|
||||
# tuwunel's start (a database open that replays the write-ahead log from
|
||||
# the beginning every time) can outlast the container's one-minute limit,
|
||||
# and a start killed on it makes no progress. So tuwunel is out of the
|
||||
# guest's boot: not wanted by `multi-user.target`, started `--no-block` by
|
||||
# a oneshot that is, with a limit of its own. The sync and the render stay
|
||||
# in the boot wait, the presence arms of the walk that finds tuwunel
|
||||
# absent from it.
|
||||
name = "the homeserver starts after the container is up, under a limit of its own, and the container's boot does not wait on it";
|
||||
ok =
|
||||
let
|
||||
host = serviceContainersWithCi;
|
||||
g = host.containers.hive-matrix.config;
|
||||
unit = g.systemd.services.tuwunel;
|
||||
starter = g.systemd.services.swarm-container-deferred-start;
|
||||
booted = bootWait.bootSet g.systemd;
|
||||
in
|
||||
g.services.hyperhive.swarmContainer.startAfterReady == [ "tuwunel" ]
|
||||
&& unit.wantedBy == [ ]
|
||||
&& bootWait.spanSeconds unit.serviceConfig.TimeoutStartSec == 1800
|
||||
&& starter.wantedBy == [ "multi-user.target" ]
|
||||
&& starter.serviceConfig.Type == "oneshot"
|
||||
&& starter.serviceConfig.TimeoutStartSec == 20
|
||||
&& lib.hasSuffix "/bin/systemctl start --no-block tuwunel.service" starter.serviceConfig.ExecStart
|
||||
&& !(lib.elem "tuwunel.service" booted)
|
||||
&& lib.elem "swarm-container-deferred-start.service" booted
|
||||
&& lib.elem "swarm-matrix-appservice-sync.service" booted
|
||||
&& lib.elem "swarm-matrix-appservice-render.service" booted;
|
||||
}
|
||||
{
|
||||
# On the bridge by DHCP, with all three listeners on sockets: nothing
|
||||
# the bridge can dial. Every vhost location that forwards goes through
|
||||
|
|
|
|||
Loading…
Reference in a new issue