banger/internal/daemon
Thales Maciel 0e764b0571
Fix two daemon bugs: Firecracker context and sessionControllers init
vm.go: Firecracker was launched with context.Background() instead of
the incoming request ctx. A cancelled or timed-out VM creation request
could not stop mid-flight Firecracker process spawning, leaving an
orphaned process and leaked resources. Replace the four firecrackerCtx
uses with ctx directly; the local variable is removed.

guest_sessions.go / daemon.go: sessionControllers map was lazily
initialized with a nil-check inside every mutating method. With d.mu
held this isn't a data race, but the pattern is fragile — any new
method that writes to the map without copying the guard can panic.
Initialize the map once in Open() alongside the other daemon maps and
channels, and remove the redundant nil-checks from setGuestSessionController
and claimGuestSessionController.
2026-04-14 19:53:26 -03:00
..
capabilities.go Add guest sessions and agent VM defaults 2026-04-12 23:48:42 -03:00
capabilities_test.go Manage image artifacts and show VM create progress 2026-03-21 14:48:01 -03:00
daemon.go Fix two daemon bugs: Firecracker context and sessionControllers init 2026-04-14 19:53:26 -03:00
daemon_test.go Rename experimental Void image to void 2026-04-01 20:15:28 -03:00
dashboard.go Serve a local web UI from bangerd 2026-03-21 16:47:47 -03:00
dns_routing.go Route .vm DNS through systemd-resolved 2026-03-22 15:07:22 -03:00
dns_routing_test.go Route .vm DNS through systemd-resolved 2026-03-22 15:07:22 -03:00
doctor.go Remove runtime-bundle image dependencies 2026-03-21 18:34:53 -03:00
fastpath_test.go Manage image artifacts and show VM create progress 2026-03-21 14:48:01 -03:00
guest_sessions.go Fix two daemon bugs: Firecracker context and sessionControllers init 2026-04-14 19:53:26 -03:00
guest_sessions_test.go Add guest.session.send and vm.workspace.export RPCs 2026-04-14 15:21:50 -03:00
image_build_ops.go Serve a local web UI from bangerd 2026-03-21 16:47:47 -03:00
image_seed.go Manage image artifacts and show VM create progress 2026-03-21 14:48:01 -03:00
imagebuild.go Install claude and pi through mise 2026-04-13 18:29:02 -03:00
imagebuild_test.go Install claude and pi through mise 2026-04-13 18:29:02 -03:00
images.go Remove runtime-bundle image dependencies 2026-03-21 18:34:53 -03:00
logger.go Speed up VM create with work seeds 2026-03-18 21:22:12 -03:00
logger_test.go Remove runtime-bundle image dependencies 2026-03-21 18:34:53 -03:00
nat.go Move helper NAT management into Go 2026-03-17 15:07:49 -03:00
nat_test.go Move helper NAT management into Go 2026-03-17 15:07:49 -03:00
opencode.go Manage image artifacts and show VM create progress 2026-03-21 14:48:01 -03:00
ports.go Refine vm ports output 2026-03-19 18:21:04 -03:00
preflight.go Remove runtime-bundle image dependencies 2026-03-21 18:34:53 -03:00
runtime_assets.go Remove runtime-bundle image dependencies 2026-03-21 18:34:53 -03:00
snapshot.go Harden VM stop cleanup for stale snapshots 2026-03-18 12:28:15 -03:00
snapshot_test.go Harden VM stop cleanup for stale snapshots 2026-03-18 12:28:15 -03:00
ssh_client_config.go Configure direct SSH access for .vm hosts 2026-03-22 16:48:42 -03:00
ssh_client_config_test.go Configure direct SSH access for .vm hosts 2026-03-22 16:48:42 -03:00
tap_pool.go Speed up VM create with work seeds 2026-03-18 21:22:12 -03:00
vm.go Fix two daemon bugs: Firecracker context and sessionControllers init 2026-04-14 19:53:26 -03:00
vm_create_ops.go Manage image artifacts and show VM create progress 2026-03-21 14:48:01 -03:00
vm_test.go Add guest sessions and agent VM defaults 2026-04-12 23:48:42 -03:00
web.go Serve a local web UI from bangerd 2026-03-21 16:47:47 -03:00
workspace.go workspace.export: add base_commit to capture worker git commits 2026-04-14 16:13:05 -03:00
workspace_test.go workspace.export: add base_commit to capture worker git commits 2026-04-14 16:13:05 -03:00