banger/internal/daemon
Thales Maciel 375900cf65
Rollback partial dm snapshot startup
Prevent partial VM startup failures from leaking loop devices and dm state on the host.

Move root snapshot setup into a rollback-safe helper that records loop and mapper handles incrementally, tears them down in reverse order on failure, and reuses the same dm/loop cleanup path during normal runtime teardown. Also switch the daemon runner field to a small command-runner interface so the snapshot path can be tested with injected failures.

Add failure-injection coverage for losetup, blockdev, dmsetup, partial teardown, and joined rollback errors. Validated with go test ./... and make build.
2026-03-16 14:06:17 -03:00
..
daemon.go Rollback partial dm snapshot startup 2026-03-16 14:06:17 -03:00
images.go Add Go daemon-driven VM control plane 2026-03-16 12:52:54 -03:00
nat.go Manage NAT directly from VM records 2026-03-16 13:50:54 -03:00
nat_test.go Manage NAT directly from VM records 2026-03-16 13:50:54 -03:00
snapshot.go Rollback partial dm snapshot startup 2026-03-16 14:06:17 -03:00
snapshot_test.go Rollback partial dm snapshot startup 2026-03-16 14:06:17 -03:00
vm.go Rollback partial dm snapshot startup 2026-03-16 14:06:17 -03:00