Watch
0
0
Fork
You've already forked hyperhive
0

order the store's readers after its container without wanting it

This commit is contained in:
atlas 2026-10-29 14:31:30 +01:00 • committed by mara
commit 868c57321c

View file

@ -824,19 +824,27 @@ let
}
{
# Both units log in to the store, so where its container runs here they
# start after it. Controls: the units exist on `noService`, which reads
# a store it does not run, and carry no container there.
name = "the cache-facts and squid credential units wait for the store's container only where it runs here";
# start after it, and none of the store's readers wants it: a `Wants=`
# would start it mid-switch on the old closure. Controls: the units exist
# on `noService`, which reads a store it does not run, and carry no
# container there.
name = "the cache-facts and squid credential units wait for the store's container, without wanting it, only where it runs here";
ok =
let
ref = "container@swarm-bao.service";
waits = u: lib.elem ref u.after && lib.elem ref u.wants;
waits = u: lib.elem ref u.after && !(lib.elem ref u.wants);
names = [
"hive-priv-cache-facts"
"squid-selfcheck-credential"
];
in
lib.all (n: waits allLocal.systemd.services.${n}) names
lib.all (n: waits allLocal.systemd.services.${n}) (
names
++ [
"hive-tls-resign"
"swarm-services-cert"
]
)
&& lib.all (
n:
noService.systemd.services ? ${n}