MicroVM task: end an attempt whose guest
C12 (task 5809, F2) observed on dev: MicroVM task 4936 ran its VM for 20 minutes on vn5862b with no observable progress from the in-guest session, and the task stayed held until the VM was stopped by hand. A guest whose agent never starts or dies, or a VM stuck in provisioning, holds its task until the VM ends; the static path ends such an attempt through session sensing (the runner-session binding + agent_session_lifecycle), which a VM task never enters (see 5810-vm-task-attach for the missing binding: apps/api/app/microvm_placement.py:267-346 admit never records the session; apps/jaahd/microvm_session.py:864 registers it only in vms.json).
Fix: give a MicroVM task the same broken-session handling a static runner gets — the node reports whether the guest's agent session is alive (microvm_facts already reports per-VM facts: apps/jaahd/microvm_facts.py collect/register_provider) and the CP ends the attempt through the existing broken-session path (tools/broken_sessions.py / agent_session_lifecycle) when the guest session is gone or provisioning exceeds a bound. Reuse existing lifecycle states and reasons; no new task state.
Done means:
- On dev, a MicroVM task whose guest agent is killed (or never starts) is ended by the system within the same bound the static path uses, with a readable reason on the task, and its VM is destroyed (node MicroVM tab: vms empty, ch_pids 0, virtiofsd_pids 0, taps_busy 0). Evidence cited.
- A healthy long-running VM task is NOT ended (negative case in a unit test).
- Unit tests for the liveness fact and the CP decision; `./dc check full` green; PR merged to develop; Jaah Deploy for dev succeeds.
Out of scope: console attach/answer delivery (5810-vm-task-attach); the e2e acceptance run; any change to static runners' liveness rules.
Outcome
MicroVM task liveness: a guest heartbeat feeds node guest_sessions; the CP ends a dead or never-started VM attempt through the existing reclaim and destroys the VM. Full gate green, PR #5166 merged, dev deploy green. Dev kill test left to 5957.
Artifacts
Activity
- Ready
- Runner started
- Runner ended (done)