banger/internal/daemon
Thales Maciel 2d5bcb5516
Fall back to forced cleanup when stop hangs
Some guests ignore CtrlAltDel long enough that vm stop sat in wait_for_exit until the client disconnected, leaving the daemon to report context canceled instead of actually stopping the VM.

Keep the graceful shutdown attempt, but treat a grace-window timeout as a fallback case: log the timeout stage and continue into the existing forced cleanup path instead of returning immediately. Add a fake Firecracker API/process regression that exercises the timeout-to-cleanup transition.

Validate with go test ./..., make build, and a live ./banger vm stop ea run that now completes instead of hanging.
2026-03-18 13:44:59 -03:00
..
daemon.go Move avoidable daemon shell-outs into Go 2026-03-17 17:13:07 -03:00
daemon_test.go Replace mapdns with daemon DNS 2026-03-17 15:49:35 -03:00
imagebuild.go Bake mise into default VM images 2026-03-18 13:13:11 -03:00
imagebuild_test.go Bake mise into default VM images 2026-03-18 13:13:11 -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 Move avoidable daemon shell-outs into Go 2026-03-17 17:13:07 -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 Move avoidable daemon shell-outs into Go 2026-03-17 17:13:07 -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 Fall back to forced cleanup when stop hangs 2026-03-18 13:44:59 -03:00
vm_test.go Fall back to forced cleanup when stop hangs 2026-03-18 13:44:59 -03:00