let the store container's cold start finish, and order its readers after it
This commit is contained in:
parent
0e840bd34b
commit
b1c828dbf8
1 changed files with 48 additions and 4 deletions
|
|
@ -822,6 +822,34 @@ let
|
|||
&& !(noIdentity.systemd.services ? squid-selfcheck-credential)
|
||||
&& !(noIdentity.systemd.timers ? squid-selfcheck-credential);
|
||||
}
|
||||
{
|
||||
# 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";
|
||||
ok =
|
||||
let
|
||||
ref = "container@swarm-bao.service";
|
||||
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:
|
||||
noService.systemd.services ? ${n}
|
||||
&& !(lib.elem ref noService.systemd.services.${n}.after)
|
||||
&& !(lib.elem ref noService.systemd.services.${n}.wants)
|
||||
) names;
|
||||
}
|
||||
{
|
||||
# The container is `Type=notify`: its start job lasts as long as
|
||||
# OpenBao's first start, which a 1min limit cuts off mid-open.
|
||||
name = "the store's container is given five minutes to start";
|
||||
ok = lib.hasInfix "TimeoutStartSec=5min" allLocal.systemd.units."container@swarm-bao.service".text;
|
||||
}
|
||||
{
|
||||
name = "hive-priv is told the cache's address by the host's configuration";
|
||||
ok =
|
||||
|
|
|
|||
Loading…
Reference in a new issue