banger/internal/daemon
Thales Maciel a14a80fd6b
Harden VM delete cleanup and SQLite settings
Multi-VM delete exposed two separate regressions: NAT teardown was still running after stopped VMs had already dropped their tap metadata, and the store was relying on one-off SQLite pragmas instead of configuring every pooled connection.

Skip NAT cleanup when the runtime no longer has the network handles needed to identify rules, and move the SQLite profile into the DSN so WAL, busy timeouts, foreign keys, and the other connection-scoped settings apply consistently across the pool. Keep the write mutex in place for concurrent mutations, and update the daemon/store tests to use valid image fixtures now that foreign key enforcement is real.

Validated with go test ./... and make build.
2026-03-18 20:39:31 -03:00
..
capabilities.go Harden VM delete cleanup and SQLite settings 2026-03-18 20:39:31 -03:00
capabilities_test.go Refactor VM lifecycle around capabilities 2026-03-18 19:28:26 -03:00
daemon.go Add vsock-backed SSH session reminders 2026-03-18 20:14:51 -03:00
daemon_test.go Replace mapdns with daemon DNS 2026-03-17 15:49:35 -03:00
doctor.go Add vsock-backed SSH session reminders 2026-03-18 20:14:51 -03:00
imagebuild.go Add vsock-backed SSH session reminders 2026-03-18 20:14:51 -03:00
imagebuild_test.go Add vsock-backed SSH session reminders 2026-03-18 20:14:51 -03:00
images.go Move avoidable daemon shell-outs into Go 2026-03-17 17:13:07 -03:00
logger.go Add structured daemon lifecycle logs 2026-03-16 16:16:28 -03:00
logger_test.go Add vsock-backed SSH session reminders 2026-03-18 20:14:51 -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
preflight.go Add vsock-backed SSH session reminders 2026-03-18 20:14:51 -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
vm.go Add vsock-backed SSH session reminders 2026-03-18 20:14:51 -03:00
vm_test.go Harden VM delete cleanup and SQLite settings 2026-03-18 20:39:31 -03:00