fix(runner-controller): count a finished VM as spent, not idle #591
Inga granskare
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!591
Läser in…
Hänvisa till i nytt ärende
Ingen beskrivning angiven.
Ta bort grenen "fix/runner-idle-spent-vm"
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?
Closes #566.
A one-job runner VM stays ACTIVE until Nova reports SHUTOFF. Its job has already left "running", so
_compute_capacitycounted it as idle and booted nothing for a queued job. Waits of 120 to 190 s happened below the cap.Change
_count_spent_vmscounts ACTIVE VMs whose Forgejo registration is gone. The controller registers the runner before boot, so a missing registration means the VM is spent._compute_capacitytakesspent_countand leaves spent VMs out of idle capacity.Tests
The three journal cases from #566 plus four edge cases.
test_controller_logic.py: 77/77.