Watch
0
0
Fork
You've already forked hyperhive
0

start the container journal forwarder's collector from its secret fetch, with backoff

This commit is contained in:
atlas 2026-11-01 18:52:06 +01:00 • committed by mara
commit a0deb29e59

View file

@ -147,6 +147,25 @@ let
&& !(lib.elem "--link-journal=host" container.extraFlags)
&& lib.any (lib.hasPrefix "--load-credential=${svc.credential}-cert:") container.extraFlags;
}
{
# The guest is ready when its job queue empties, so a long fetch job
# at boot would hold the container's start past its limit.
name = "the ${svc.name} forwarder's fetch retries with backoff outside the boot wait and starts the collector";
ok =
let
collector = c.systemd.services.opentelemetry-collector;
sc = fetch.serviceConfig;
in
collector.wantedBy == [ ]
&& lib.elem "swarm-journal-forwarder-oidc.service" collector.after
&& lib.elem "multi-user.target" fetch.wantedBy
&& sc.Restart == "on-failure"
&& sc.TimeoutStartSec <= 30
&& sc.RestartSteps > 0
&& sc.RestartMaxDelaySec > sc.RestartSec
&& !(lib.hasInfix "retry_in_job" fetch.script)
&& lib.hasInfix "systemctl start --no-block opentelemetry-collector.service" fetch.script;
}
{
name = "the ${svc.name} forwarder's metrics port is its own and loopback";
ok =