swarm-nats: the units the responder requires uphold it
A start job of swarm-nats-auth that fails on a dependency (the server, or the container's trust bundle, failing first) leaves the unit inactive rather than failed, so Restart=always never applies. Its recovery was a set of one-shot host kicks; when the last of them still found a dependency down, the responder stayed dead and the queue refused every client (nightly full-setup, runs 8058 and 7917). upheldBy the units it requires: whichever comes up last starts it.
This commit is contained in:
parent
7c2f7443fb
commit
887ea26c56
1 changed files with 35 additions and 3 deletions
|
|
@ -92,8 +92,17 @@ the server in `swarm-nats` (`swarm-bao-nats-tls` on a leaf rotation,
|
|||
`swarm-bao-nats-callout-xkey` after fetching the keys) also clears the
|
||||
responder's failed state and starts it. Those scripts use `start`, not
|
||||
`restart`: the server's restart already restarts a running responder, which loads
|
||||
the current seeds. Stopping the responder by hand lasts only until the next
|
||||
key or leaf run, which starts it again. To keep it down, mask it.
|
||||
the current seeds.
|
||||
|
||||
Those starts can still fail: a start job fails when a unit the responder
|
||||
requires, the server or the container's trust bundle, fails first, and a
|
||||
failed job leaves the responder inactive, out of `Restart=`'s reach. Both
|
||||
units therefore uphold it (systemd's `Upholds=`): while either one runs, systemd starts
|
||||
an inactive or failed responder, and the unit that comes up last starts it with
|
||||
both up. This also means stopping the responder or the server by hand inside
|
||||
the container lasts only as long as the stop itself: systemd starts the
|
||||
responder again, and the responder pulls the server back in. To keep it down,
|
||||
mask it, or stop the container.
|
||||
|
||||
The responder's store leaf is `deploy.nats.authBaoClientCertFile` /
|
||||
`authBaoClientKeyFile`. On the store's host both default to the leaf
|
||||
|
|
|
|||
Loading…
Reference in a new issue