swarm-nats: the auth responder has no start limit, always restarts, and is started after the server's restarts
This commit is contained in:
parent
a95fdc6281
commit
8530a5b7fd
1 changed files with 70 additions and 6 deletions
|
|
@ -381,6 +381,22 @@ let
|
|||
natsOnStoreHost
|
||||
];
|
||||
}
|
||||
{
|
||||
# A burst of starts must not leave the responder failed, and a stop
|
||||
# from the server failing must not leave it down: no start limit and
|
||||
# `Restart=always`. `RestartSec` is the control that the lookup reaches
|
||||
# the unit's real `serviceConfig`; the callout key fetch starts the
|
||||
# responder after it restarts the server.
|
||||
name = "the queue's responder has no start limit, always restarts, and is started after the key fetch";
|
||||
ok =
|
||||
let
|
||||
r = responderOf natsQueueOnly;
|
||||
in
|
||||
r.startLimitIntervalSec == 0
|
||||
&& r.serviceConfig.Restart == "always"
|
||||
&& r.serviceConfig.RestartSec == "5s"
|
||||
&& lib.hasInfix "start --no-block swarm-nats-auth.service" natsWithStoreIdentity.systemd.services.swarm-bao-nats-callout-xkey.script;
|
||||
}
|
||||
{
|
||||
# A server that starts late, once its xkey arrives, must bring the
|
||||
# responder with it: the responder requires the server, so a server that
|
||||
|
|
|
|||
Loading…
Reference in a new issue