Size: M · Area: backend · Depends on: #163 · Part of #161
Implement host-agent's brain-bootstrap responsibility — the 5-step sequence the spec already describes but no code implements (cmd/host-agent-real/ does PAM / Avahi / users / health, but never launches a container).
Spec / source of truth: CONTROL_PLANE.md # Locked: host-agent launches the brain container · BUILD.md # First-boot brain bootstrap
Do:
- In
host-agent-real, after Docker is ready: docker load the bundled image if absent, start the brain container with restart=unless-stopped, mount the agent socket + /var/lib/malmo + state, and perform the lockstep protocol-version check before launch.
- Un-stub the QEMU lane:
dev/test-qemu/bootstrap.sh:236 ln -sf /bin/true … host-agent-real → the real binary; enable host-agent.service (reverse the mkosi.postinst.chroot disable).
Touch: cmd/host-agent-real/, internal/hostagent/… (new launch package), dev/test-qemu/bootstrap.sh, dev/test-qemu/mkosi.postinst.chroot.
Done when: booting the VM yields a running malmo-brain container launched by host-agent; brain logs show it came up; a lockstep mismatch refuses launch with a clear error.
Size: M · Area: backend · Depends on: #163 · Part of #161
Implement host-agent's brain-bootstrap responsibility — the 5-step sequence the spec already describes but no code implements (
cmd/host-agent-real/does PAM / Avahi / users / health, but never launches a container).Spec / source of truth:
CONTROL_PLANE.md# Locked: host-agent launches the brain container ·BUILD.md# First-boot brain bootstrapDo:
host-agent-real, after Docker is ready:docker loadthe bundled image if absent, start the brain container withrestart=unless-stopped, mount the agent socket +/var/lib/malmo+ state, and perform the lockstep protocol-version check before launch.dev/test-qemu/bootstrap.sh:236ln -sf /bin/true … host-agent-real→ the real binary; enablehost-agent.service(reverse themkosi.postinst.chrootdisable).Touch:
cmd/host-agent-real/,internal/hostagent/…(new launch package),dev/test-qemu/bootstrap.sh,dev/test-qemu/mkosi.postinst.chroot.Done when: booting the VM yields a running
malmo-braincontainer launched by host-agent; brain logs show it came up; a lockstep mismatch refuses launch with a clear error.