monitoring: nothing alerts when the runner controller stops #602
Etiketter
Inga etiketter
area/backups
area/ci
area/control-panel
area/identity
area/infra
area/observability
area/payments
area/security
area/storage
area/web
blocked
needs-info
needs-triage
priority
high
priority
low
priority
medium
ready-for-implementation
type
bug
type
chore
type
docs
type
epic
type
feature
type
task
wontfix
Ingen milstolpe
Inget projekt
Inga tilldelade
1 deltagare
Notiser
Förfallodatum
Inget förfallodatum satt.
Beroenden
Inga beroenden satta
Referens
bitborg/bitborg-infra#602
Läser in…
Hänvisa till i nytt ärende
Ingen beskrivning angiven.
Ta bort grenen "%!s()"
Borttagning av en gren är permanent. Även om den borttagna grenen kan fortsätta existera en kort tid innan den faktiskt tas bort, kan det INTE ångras i de flesta fall. Vill du fortsätta?
What
The runner controller writes
last_loop_ok,last_loop_timestamp_secondsandqueued_jobsto a textfile. The dashboard shows them. No alert rule readslast_loop_okor the timestamp. The controller container is not inmonitoring_core_units, soCoreUnitDownignores it.Why
A broken controller means CI gets no runners. Nothing pages anyone. The comment at
alert-rules.yml.j2:506says the-1sentinel is covered bylast_loop_okand textfile staleness. That coverage does not exist.Failing case
reconcile()raises every cycle (controller.py:1886). The loop writeslast_loop_ok=0andqueued_jobs=-1. The rulequeued_jobs > 0is false for-1, so nothing fires.controller.py:1520). The textfile freezes atqueued_jobs=0. Nothing fires.Fix
Add two rules in
ansible/roles/monitoring/templates/alert-rules.yml.j2:bitborg_runner_controller_last_loop_ok == 0for 10m.time() - bitborg_runner_controller_last_loop_timestamp_seconds > 300for 5m.Add the controller container to
monitoring_core_units. Correct the comment at line 506. Use the metric prefix variable the other controller rules use.Done when
scripts/check-alert-rules.py.monitoring_core_units.alert-rules.yml.j2:506is accurate.