make bao readers want swarm-bao-pki and drop its start limit
A pki start refused by its start limit failed every reader that Requires= it with `dependency`. That leaves a unit inactive, not failed, so Restart=on-failure never fired and readers without a refresh timer never ran again (#5381: grafana 502 for ~43 min). Readers and granting units now Wants= + After= pki; one whose leaf is still missing fails its login with exit 1 into its existing retry. pki gets StartLimitIntervalSec=0: it is deliberately not RemainAfterExit, so each reader's start re-runs it.
This commit is contained in:
parent
141be16c6d
commit
265f8a47cc
12 changed files with 95 additions and 46 deletions
|
|
@ -158,16 +158,19 @@ in
|
|||
(lib.mkIf (deployCfg.hive-controller.enable && haveClientIdentity) {
|
||||
systemd.services.swarm-bao-queue-agent = {
|
||||
description = "fetch this hive's agent queue credential from the swarm secret store";
|
||||
# Every one of these names a unit that exists only where the store runs.
|
||||
# `Requires=` on an absent unit fails the job outright, so the ordering is
|
||||
# conditional even though the read is not: off-host there is nothing local
|
||||
# to wait for, and the timeout below is what bounds the attempt instead.
|
||||
# Every one of these names a unit that exists only where the store runs,
|
||||
# so the ordering is conditional even though the read is not: off-host
|
||||
# there is nothing local to wait for, and the timeout below is what
|
||||
# bounds the attempt instead. `Wants=` pki, for
|
||||
# ./glue-bao-readers-store-order.nix's reason.
|
||||
after = lib.optionals baoDeploy.enable [
|
||||
"swarm-bao-pki.service"
|
||||
"container@${baoCfg.machine}.service"
|
||||
];
|
||||
wants = lib.optionals baoDeploy.enable [ "container@${baoCfg.machine}.service" ];
|
||||
requires = lib.optionals baoDeploy.enable [ "swarm-bao-pki.service" ];
|
||||
wants = lib.optionals baoDeploy.enable [
|
||||
"swarm-bao-pki.service"
|
||||
"container@${baoCfg.machine}.service"
|
||||
];
|
||||
# Ordered before hive-c0re, so no agent container renders ahead of an
|
||||
# attempt at its credential. `Wants=`, not `Requires=`: a store this
|
||||
# unit can't reach delays hive-c0re's start by one attempt
|
||||
|
|
|
|||
Loading…
Reference in a new issue