swarm-bao, swarm-nats: bound each attempt of the hand-copied store-retry units
The granting units (granterPolicyUnit's 17, swarm-bao-granter-role, swarm-bao-controller-policy, swarm-bao-agent-pki) and swarm-bao-nats-tls copy store-retry's restart budget by hand, are Type=oneshot, and set no TimeoutStartSec, so systemd gives each attempt no start timeout. A store that accepts a connection and never answers leaves the attempt running forever: Restart=on-failure never fires, units ordered after it wait, and swarm-bao-nats-tls's daily timer starts a unit that is still activating. Each now sets TimeoutStartSec: 60 for the granting units and the granter's role, 2min for controller-policy (it may generate the services root), 5min for agent-pki and nats-tls (each may wait on a blocking restart of a server in a container). module-eval-bao-grants and module-eval-nats-tls assert the bound is finite. The restart budget itself is unchanged; that is #5305. Closes #5306
This commit is contained in:
parent
a67097f440
commit
2ab8be61a2
4 changed files with 38 additions and 0 deletions
|
|
@ -1125,6 +1125,7 @@ let
|
|||
RemainAfterExit = true;
|
||||
Restart = "on-failure";
|
||||
RestartSec = 30;
|
||||
TimeoutStartSec = 60;
|
||||
};
|
||||
script = ''
|
||||
set -euo pipefail
|
||||
|
|
@ -2935,6 +2936,7 @@ in
|
|||
RemainAfterExit = true;
|
||||
Restart = "on-failure";
|
||||
RestartSec = 30;
|
||||
TimeoutStartSec = 60;
|
||||
# Runs only once the script above exits 0, which is when the
|
||||
# granter may first configure `auth/oidc`; the viewer unit exits 0
|
||||
# without doing so before then, and nothing else re-runs it. A
|
||||
|
|
@ -3055,6 +3057,9 @@ in
|
|||
RemainAfterExit = true;
|
||||
Restart = "on-failure";
|
||||
RestartSec = 30;
|
||||
# Above the granting units' 60s: an attempt may generate the
|
||||
# services root, a 4096-bit RSA key.
|
||||
TimeoutStartSec = "2min";
|
||||
};
|
||||
script = ''
|
||||
set -euo pipefail
|
||||
|
|
@ -3462,6 +3467,10 @@ in
|
|||
RemainAfterExit = true;
|
||||
Restart = "on-failure";
|
||||
RestartSec = 30;
|
||||
# An attempt may generate a 4096-bit RSA root and then wait on a
|
||||
# blocking restart of openbao: its stop and its start, 90s each by
|
||||
# systemd's defaults.
|
||||
TimeoutStartSec = "5min";
|
||||
};
|
||||
script = ''
|
||||
set -euo pipefail
|
||||
|
|
|
|||
Loading…
Reference in a new issue