retry the authelia mint and the appservice render until the store answers, and let tuwunel retry
This commit is contained in:
parent
f13c78cd2d
commit
c4924d227b
1 changed files with 85 additions and 30 deletions
|
|
@ -1044,23 +1044,29 @@ in
|
|||
# The swarm registration. The credential id carries a `.yaml`
|
||||
# suffix on purpose: `appservice_dir` above names this very
|
||||
# directory, and tuwunel takes only `.yaml`/`.yml` entries from
|
||||
# it. A missing source fails this unit, which is why the render
|
||||
# below is `requiredBy` it.
|
||||
# it. A missing source fails this unit rather than starting it
|
||||
# without the registration.
|
||||
++ lib.optional ctlActive "${swarmAppserviceCredentialId}:${swarmAppserviceRuntimeDir}/swarm.yaml";
|
||||
|
||||
# Upstream's `Restart=on-failure` retries a start that failed for
|
||||
# want of the registration; a start limit would end the retries.
|
||||
systemd.services.tuwunel.startLimitIntervalSec = lib.mkIf ctlActive 0;
|
||||
|
||||
# The swarm registration, fetched from the store and rendered onto
|
||||
# the tmpfs before the homeserver loads it. A store that does not
|
||||
# answer fails this unit, and with it the homeserver's start: the
|
||||
# tokens are on no disk to start from. It retries like the other
|
||||
# store fetches, and `swarm-matrix-appservice-sync` below starts the
|
||||
# homeserver once the registration is there.
|
||||
# answer fails this unit, and the homeserver's start fails on the
|
||||
# missing credential: the tokens are on no disk to start from. Both
|
||||
# retry, so the homeserver comes up on its own once a render has
|
||||
# landed. `wantedBy`, not `requiredBy`: a start whose dependency
|
||||
# failed is dropped without running, and the homeserver's own retry
|
||||
# never begins.
|
||||
#
|
||||
# `RuntimeDirectoryPreserve` because the sync unit shares the
|
||||
# directory: neither unit's stop may remove it from under the other.
|
||||
systemd.services.swarm-matrix-appservice-render = lib.mkIf ctlActive {
|
||||
description = "render the swarm's appservice registration";
|
||||
before = [ "tuwunel.service" ];
|
||||
requiredBy = [ "tuwunel.service" ];
|
||||
wantedBy = [ "tuwunel.service" ];
|
||||
inherit (storeRetry) startLimitBurst startLimitIntervalSec;
|
||||
serviceConfig = storeRetry.serviceConfig // {
|
||||
Type = "oneshot";
|
||||
|
|
|
|||
Loading…
Reference in a new issue