agent trust bundle: retry the root fetch inside its start job so a dns blip at boot queues the harness instead of failing it
This commit is contained in:
parent
fec66af1c8
commit
abf21683b9
1 changed files with 158 additions and 5 deletions
|
|
@ -97,6 +97,19 @@ let
|
|||
&& !(agentForgeNoBao.systemd.globalEnvironment ? SSL_CERT_FILE)
|
||||
&& !(lib.elem unit (agentForgeNoBao.systemd.services.hive-agent.after or [ ]));
|
||||
}
|
||||
{
|
||||
# ../agent-modules/hive-ca.nix. The fetch retries inside the start job
|
||||
# and the job's timeout outlasts the retry budget, so a consumer that
|
||||
# `Requires=` the unit waits instead of failing with `dependency`.
|
||||
name = "the swarm root fetch retries inside its start job and the timeout outlasts the retries";
|
||||
ok =
|
||||
let
|
||||
unit = agentForgeBao.systemd.services.hive-agent-trust-bundle;
|
||||
budget = 840;
|
||||
in
|
||||
lib.hasInfix "retry_in_job ${toString budget} fetch_root" unit.script
|
||||
&& unit.serviceConfig.TimeoutStartSec > budget;
|
||||
}
|
||||
{
|
||||
# The whole switch is the store address, as for the queue credential.
|
||||
name = "an agent with a store address fetches its forge token";
|
||||
|
|
|
|||
Loading…
Reference in a new issue