Watch
0
0
Fork
You've already forked hyperhive
0

glue: hive-otel's ordering after authelia moves out of the otel module

The hive collector's secret-wait unit read deploy.authelia.enable to
order itself after authelia's container. That ordering is now set by
glue-hive-otel-authelia.nix, which restates the unit's own gate (otel's
`waits`). The rendered unit is unchanged.

The hive-otel module-eval fixture `hiveOtel` gains authelia, and a case
pins the edge with authelia here and its absence without.

Part of #3742.
This commit is contained in:
atlas 2026-10-13 10:35:25 +02:00 • committed by mara
commit 40ebd45c66
4 changed files with 64 additions and 5 deletions

View file

@ -25,9 +25,12 @@ let
# This hive's own collector, which is a HOST service — unlike the swarm
# tier's, which lives in a container and is read through `otelSettings`.
# The IdP is here too, with a hand-named secret file: the collector's wait
# for that file exists beside authelia's container.
hiveOtel = hive {
otel.enable = true;
otel.clientSecretFile = "/var/lib/hive-otel-oidc/client.secret";
deploy.authelia.enable = true;
};
# A hive holding its own store leaf, placed by hand, and naming no secret
@ -299,6 +302,22 @@ let
&& waitsFor hiveOtel
&& waitsFor baoWithHiveOtel;
}
{
# ../host-modules/glue-hive-otel-authelia.nix orders the wait after
# authelia's container. `hiveOtel` has the IdP; `baoWithHiveOtel` waits
# on the same kind of file without it, and must not name a container
# that is not there — `Requires=` on an absent unit fails the job.
name = "the hive collector's secret wait is ordered after authelia's container only where authelia runs here";
ok =
let
container = "container@${hiveOtel.services.hyperhive.swarm.authelia.machine}.service";
wait = machine: machine.systemd.services.hive-otel-client-secret;
in
builtins.elem container (wait hiveOtel).after
&& builtins.elem container (wait hiveOtel).requires
&& !(builtins.elem container (wait baoWithHiveOtel).after)
&& !(builtins.elem container (wait baoWithHiveOtel).requires);
}
];
in
runGroup "hive-otel" cases