start the container journal forwarder's collector from its secret fetch, with backoff
This commit is contained in:
parent
052c46ab25
commit
a0deb29e59
1 changed files with 51 additions and 7 deletions
|
|
@ -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 =
|
||||
|
|
|
|||
Loading…
Reference in a new issue