swarm-otel: a timer starts the receiver-socket check again while it is failed
swarm-otel-sockets probes once at activation. On a fresh swarm the collector opens its sockets only after authelia answers, which is after the operator unseals the store, so the probe failed and stayed failed after ingest worked: the only red unit on the swarm. swarm-otel-sockets-recheck.timer now starts it again each minute, and only while it is failed (an ExecCondition on systemctl is-failed), with a restart that does not block. The check itself gets no Restart: a oneshot's start job stays pending through an automatic restart, so a switch would wait on it for as long as the collector is down, and the failed check is what the switch reports. full-setup waits for the check to be active after the collector has recovered, and the module-eval case pins the timer, the condition and the absence of a Restart. Closes #6836
This commit is contained in:
parent
870a0a6697
commit
912b2d9570
1 changed files with 72 additions and 2 deletions
|
|
@ -226,6 +226,19 @@ with subtest("the swarm collector's client secret reaches the host"):
|
|||
"swarm-bao-otel-oidc",
|
||||
)
|
||||
|
||||
with subtest("the receiver-socket check is active once the collector has recovered"):
|
||||
# The collector opens its sockets only after authelia answers, which on a fresh swarm is
|
||||
# after the unseal. `swarm-otel-sockets` runs at activation, long before that, so its first
|
||||
# attempt fails; `swarm-otel-sockets-recheck` has to start it again, or it stays failed (and
|
||||
# the only red unit on the swarm) after ingest works. The timer fires each minute and an
|
||||
# attempt takes up to 30 s, so the wait covers several rounds.
|
||||
settle(
|
||||
'[ "$(systemctl is-active swarm-otel-sockets.service)" = active ]',
|
||||
600,
|
||||
"swarm-otel-sockets",
|
||||
"swarm-otel",
|
||||
)
|
||||
|
||||
with subtest("step 2: swarmctl user add"):
|
||||
machine.wait_until_succeeds(
|
||||
"swarmctl user add mara --display-name Mara --email mara@example.com --group admins "
|
||||
|
|
|
|||
Loading…
Reference in a new issue