Add experimental Void guest workflow and vsock agent

Make iterating on a Firecracker-friendly Void guest practical without replacing the Debian default image path.

Add local Void rootfs build/register/verify plumbing, a language-agnostic dev package baseline, and guest SSH/work-disk hardening so new images use the runtime bundle key, keep a normal root bash environment, and repair stale nested /root layouts on restart.

Replace the guest PING/PONG responder with an HTTP /healthz agent over vsock, rename the runtime bundle and config surface from ping helper to agent while still accepting the legacy keys, and route the post-SSH reminder through the new vm.health path.

Validated with GOCACHE=/tmp/banger-gocache go test ./..., make build, bash -n customize.sh make-rootfs-void.sh, and git diff --check.
This commit is contained in:
Thales Maciel 2026-03-19 14:51:25 -03:00
parent c8d9a122f9
commit 3ed78fdcfc
No known key found for this signature in database
GPG key ID: 33112E6833C34679
42 changed files with 2222 additions and 388 deletions

View file

@ -128,7 +128,7 @@ func TestSDKLoggerBridgeSuppressesDebugAtInfoLevel(t *testing.T) {
}
}
func TestPingVSock(t *testing.T) {
func TestHealthVSock(t *testing.T) {
dir := t.TempDir()
socketPath := filepath.Join(dir, "fc.vsock")
listener, err := net.Listen("unix", socketPath)
@ -174,22 +174,22 @@ func TestPingVSock(t *testing.T) {
return
}
buf = append(buf, tmp[:n]...)
if strings.Contains(string(buf), "\n") {
if strings.Contains(string(buf), "\r\n\r\n") {
break
}
}
if got := string(buf); got != "PING\n" {
if got := string(buf); !strings.Contains(got, "GET /healthz HTTP/1.1\r\n") {
done <- errUnexpectedString(got)
return
}
_, err = conn.Write([]byte("PONG\n"))
_, err = conn.Write([]byte("HTTP/1.1 200 OK\r\nContent-Type: application/json\r\nContent-Length: 15\r\n\r\n{\"status\":\"ok\"}"))
done <- err
}()
ctx, cancel := context.WithTimeout(context.Background(), 2*time.Second)
defer cancel()
if err := PingVSock(ctx, nil, socketPath); err != nil {
t.Fatalf("PingVSock: %v", err)
if err := HealthVSock(ctx, nil, socketPath); err != nil {
t.Fatalf("HealthVSock: %v", err)
}
if err := <-done; err != nil {
t.Fatalf("server: %v", err)