banger/internal
Thales Maciel 942d242c03
Move avoidable daemon shell-outs into Go
Reduce the control plane's dependency on helper scripts while keeping the hard Linux integration points in the approved shell-out layer.

Replace the bash-driven image build path with a native Go builder that clones and optionally resizes the rootfs, boots a temporary Firecracker VM, provisions the guest over SSH, installs packages and modules, and preserves the package-manifest sidecar.

Also replace a few small convenience shell-outs with Go helpers: read process stats from /proc, use os.Truncate for ext4 image growth, add file-clone and normalized-line helpers, drop the sh -c work-disk flattening path, and launch Firecracker via a direct sudo command.

Add tests for the new SSH/archive and system helpers, plus a policy test that keeps os/exec imports confined to cli/firecracker/system. Update the docs to describe customize.sh as a manual helper rather than the daemon's image-build backend.

Validated with go mod tidy, go test ./..., and make build.
2026-03-17 17:13:07 -03:00
..
api Reject invalid VM CPU and memory values 2026-03-16 16:28:17 -03:00
cli Replace mapdns with daemon DNS 2026-03-17 15:49:35 -03:00
config Replace mapdns with daemon DNS 2026-03-17 15:49:35 -03:00
daemon Move avoidable daemon shell-outs into Go 2026-03-17 17:13:07 -03:00
firecracker Move avoidable daemon shell-outs into Go 2026-03-17 17:13:07 -03:00
guest Move avoidable daemon shell-outs into Go 2026-03-17 17:13:07 -03:00
hostnat Move helper NAT management into Go 2026-03-17 15:07:49 -03:00
model Replace mapdns with daemon DNS 2026-03-17 15:49:35 -03:00
paths Make runtime defaults portable 2026-03-16 15:30:08 -03:00
policy Move avoidable daemon shell-outs into Go 2026-03-17 17:13:07 -03:00
rpc Propagate RPC cancellation to daemon requests 2026-03-16 18:28:33 -03:00
runtimebundle Replace mapdns with daemon DNS 2026-03-17 15:49:35 -03:00
store Add regression coverage for VM failure paths 2026-03-16 15:46:54 -03:00
system Move avoidable daemon shell-outs into Go 2026-03-17 17:13:07 -03:00
vmdns Replace mapdns with daemon DNS 2026-03-17 15:49:35 -03:00