glue: consumers' start-after-bao ordering moves into one glue module
Each store reader (forge's OIDC fetch and token publisher, matrix's OIDC fetch, the hive collector's fetch, Grafana's OIDC fetch and admin password, the queue's callout-xkey unit, the CI runner's token fetch, the swarm collector's OIDC fetch) used to read `deploy.bao.enable` in its own module to add `after`/`wants` on `container@<store machine>` and `after`/`requires` on `swarm-bao-pki.service`. Per the #3742 ruling, that cross-service read moves into glue-bao-readers-store-order.nix, which sets the same edges when the store and the reader are both on this host and restates each reader's own gate so no stub unit is rendered. Rendered `after`/`wants`/`requires` are identical as sets to main on 16 fixtures, store here and elsewhere. New module-eval cases in existing fixtures pin both arms. Part of #3742.
This commit is contained in:
parent
40ebd45c66
commit
9407db69b5
13 changed files with 198 additions and 76 deletions
|
|
@ -187,6 +187,21 @@ let
|
|||
ciAlone.systemd.services.swarm-bao-ci-runner.environment.BAO_CLIENT_CERT
|
||||
== "/etc/pki/bao-ci-runner.pem";
|
||||
}
|
||||
{
|
||||
# The store's units exist only on its host; `Requires=` on an absent one
|
||||
# fails the fetch's start. The arm where the store is here is in
|
||||
# ./swarm-services-switch.nix.
|
||||
name = "the CI runner's token fetch names none of the store's units on a host without the store";
|
||||
ok =
|
||||
let
|
||||
u = ciAlone.systemd.services.swarm-bao-ci-runner;
|
||||
storeUnits = [
|
||||
"swarm-bao-pki.service"
|
||||
"container@${ciAlone.services.hyperhive.swarm.bao.machine}.service"
|
||||
];
|
||||
in
|
||||
!(lib.any (n: lib.elem n (u.after ++ u.wants ++ u.requires)) storeUnits);
|
||||
}
|
||||
{
|
||||
# Without the identity the token never arrives; the control is the
|
||||
# placed pair above.
|
||||
|
|
|
|||
Loading…
Reference in a new issue