swarm-otel, swarm-grafana: a delivery unit fails on no value yet
The collector's and Grafana's OIDC delivery units exited 0 when the store held no value, so systemd did not retry them. On a fresh swarm authelia's mint writes the secret about 30 s after the first read, and only the refresh timer, ten minutes on, read it again. Both units now exit 75, and the store retry they already carry asks every 30 s until the mint lands. Closes #6790
This commit is contained in:
parent
480855dfaf
commit
dad288d555
1 changed files with 88 additions and 22 deletions
|
|
@ -65,8 +65,9 @@ the client it reads for unconditionally: authelia refuses a
|
|||
bearer-authz client with no audience, and every host publishes at least
|
||||
forgejo's `/metrics` as a scrape target, so the audience is never empty.
|
||||
|
||||
Until the store answers, the collector's secret file is empty: tmpfiles creates
|
||||
it so `LoadCredential` has a source. The collector's unit starts through a
|
||||
Until the store has the value, the collector's secret file is empty: tmpfiles
|
||||
creates it so `LoadCredential` has a source. The unit fails and asks again
|
||||
every 30 seconds while the store holds none, the same as Grafana's. The collector's unit starts through a
|
||||
wrapper that checks that file. On an empty one it loads the config without the
|
||||
`publishedScrapeTargets` jobs, so it still receives and still scrapes its own
|
||||
loopback targets, but asks authelia for no token. The prometheus receiver reads
|
||||
|
|
@ -126,7 +127,11 @@ one delivery route: `swarm-bao-grafana-oidc.service` reads
|
|||
`swarm/services/<client-id>/oidc/client` out of the store, on **every** host
|
||||
that runs Grafana. Where authelia is doesn't enter into it — the mint in
|
||||
authelia's container writes that path whether the reader is a network away or in the
|
||||
container next door.
|
||||
container next door. On a fresh swarm the mint writes it a moment after the
|
||||
reader's first attempt, so a read that finds no value yet fails and the unit
|
||||
asks again every 30 seconds until the value is there, as the forge's and the
|
||||
homeserver's do. A unit that finished there would wait for its refresh timer,
|
||||
about ten minutes on.
|
||||
|
||||
That's a deliberate refusal of the shortcut. Copying the plaintext
|
||||
straight out of authelia's tree when the two happen to share a host is one
|
||||
|
|
|
|||
Loading…
Reference in a new issue