feat(runner-controller): break queue wait down by state #567

Stängd
öppnade 2026-10-08 13:48:40 +00:00 av supernaut · 0 kommentarer
Ägare

The pickup gauges (#328) say how long a job waited, not why. Tracing the slow pickups of 2026-10-02 and 2026-10-05 took a manual walk through the controller journal.

Goal

Attribute every second a job spends queued to one state, from data the reconcile loop already reads:

State Meaning
at_cap active VMs at max_total
quota create refused by OpenStack quota
booting a VM was created for it, not ACTIVE yet
registering VM ACTIVE, runner not online yet
unclaimed an idle runner is online, job still queued
spent_counted_idle no create because a finished VM counts as idle (#566)
controller_error the loop failed this cycle

Tasks

  • Counter bitborg_runner_controller_queue_wait_seconds_total{state} and gauge bitborg_runner_controller_queued_jobs{state}.
  • Persist first-seen times across a controller restart, so a restart does not zero the window mid-episode.
  • Add a short-window pickup figure (max over the last 15 min) so RunnerPickupSlow clears when the queue empties, not 6 h later.
  • Runners dashboard: stacked wait-by-state panel.
  • Docs: the runbook section on slow CI reads the new panel first.
The pickup gauges (#328) say how long a job waited, not why. Tracing the slow pickups of 2026-10-02 and 2026-10-05 took a manual walk through the controller journal. ## Goal Attribute every second a job spends queued to one state, from data the reconcile loop already reads: | State | Meaning | | --- | --- | | `at_cap` | active VMs at `max_total` | | `quota` | create refused by OpenStack quota | | `booting` | a VM was created for it, not ACTIVE yet | | `registering` | VM ACTIVE, runner not online yet | | `unclaimed` | an idle runner is online, job still queued | | `spent_counted_idle` | no create because a finished VM counts as idle (#566) | | `controller_error` | the loop failed this cycle | ## Tasks - [ ] Counter `bitborg_runner_controller_queue_wait_seconds_total{state}` and gauge `bitborg_runner_controller_queued_jobs{state}`. - [ ] Persist first-seen times across a controller restart, so a restart does not zero the window mid-episode. - [ ] Add a short-window pickup figure (max over the last 15 min) so `RunnerPickupSlow` clears when the queue empties, not 6 h later. - [ ] Runners dashboard: stacked wait-by-state panel. - [ ] Docs: the runbook section on slow CI reads the new panel first.
Logga in för att delta i denna konversation.
Ingen milstolpe
Inga tilldelade
1 deltagare
Notiser
Förfallodatum
Förfallodatumet är ogiltigt eller utanför gränserna. Använd formatet "åååå-mm-dd".

Inget förfallodatum satt.

Beroenden

Inga beroenden satta

Referens
bitborg/bitborg-infra#567
Ingen beskrivning angiven.