matrix-ctl: restart the homeserver when it loaded another registration, not when the file is newer, and never while it starts
This commit is contained in:
parent
72b05d269c
commit
e77758d0d0
1 changed files with 210 additions and 46 deletions
|
|
@ -69,9 +69,14 @@ container's tmpfs, before tuwunel starts.
|
|||
A render that can't reach the store fails and retries, and tuwunel, which fails to start without the registration, retries until one has landed.
|
||||
`appservice sync` runs beside tuwunel on a timer. The store's tokens win:
|
||||
when they differ from the rendered copy, it rewrites it. It
|
||||
restarts tuwunel whenever the registration is newer than tuwunel's last
|
||||
start, so the next run retries one that failed after writing, and starts
|
||||
one that failed because `render` couldn't reach the store. A store that
|
||||
restarts tuwunel when it's not running on the registration on disk: the
|
||||
text it loaded (systemd's copy of the credential, made at its start) differs
|
||||
from the file, however old the file is, so a boot's rewrite of the same text
|
||||
restarts nothing. Where `sync` can't read that copy it goes by the file's time
|
||||
against tuwunel's last start. It never stops a tuwunel that's still
|
||||
starting, which has no start time yet; the next run decides. The next run
|
||||
also retries one that failed after writing, and starts one that failed
|
||||
because `render` couldn't reach the store. A store that
|
||||
holds none takes the tokens an earlier version kept in
|
||||
`/var/lib/swarm-matrix-appservice` with a create-only write, so a running
|
||||
swarm keeps its value; the files stay, unused. A host with neither files nor stored tokens mints a pair. `sync` then writes the `as_token`
|
||||
|
|
|
|||
Loading…
Reference in a new issue