Add vsock-backed SSH session reminders
Remind users when a VM is still running after hanger vm ssh exits instead of silently dropping them back to the host shell.\n\nAttach a Firecracker vsock device to each VM, persist the host vsock path/CID,\nadd a new guest-side banger-vsock-pingd responder to the runtime bundle and both\nimage-build paths, and expose a vm.ping RPC that the CLI and TUI call after SSH\nreturns. Doctor and start/build preflight now validate the helper plus\n/dev/vhost-vsock so the feature fails early and clearly.\n\nValidated with go mod tidy, bash -n customize.sh, git diff --check, make build,\nand GOCACHE=/tmp/banger-gocache go test ./... outside the sandbox because the\ndaemon tests need real Unix/UDP sockets. Rebuild the image/rootfs used for new\nVMs so the guest ping service is present.
This commit is contained in:
parent
4930d82cb9
commit
08ef706e3f
31 changed files with 912 additions and 75 deletions
9
Makefile
9
Makefile
|
|
@ -12,8 +12,9 @@ RUNTIME_MANIFEST ?= runtime-bundle.toml
|
|||
RUNTIME_SOURCE_DIR ?= runtime
|
||||
RUNTIME_ARCHIVE ?= dist/banger-runtime.tar.gz
|
||||
BINARIES := banger bangerd
|
||||
RUNTIME_HELPERS := $(RUNTIME_SOURCE_DIR)/banger-vsock-pingd
|
||||
GO_SOURCES := $(shell find cmd internal -type f -name '*.go' | sort)
|
||||
RUNTIME_EXECUTABLES := firecracker customize.sh packages.sh namegen
|
||||
RUNTIME_EXECUTABLES := firecracker customize.sh packages.sh namegen banger-vsock-pingd
|
||||
RUNTIME_DATA_FILES := packages.apt id_ed25519 rootfs-docker.ext4
|
||||
RUNTIME_OPTIONAL_DATA_FILES := rootfs.ext4 bundle.json
|
||||
RUNTIME_BOOT_FILES := wtf/root/boot/vmlinux-6.8.0-94-generic wtf/root/boot/initrd.img-6.8.0-94-generic
|
||||
|
|
@ -36,7 +37,7 @@ help:
|
|||
' make clean Remove built Go binaries' \
|
||||
' make rootfs Rebuild the source-checkout default rootfs image in ./runtime'
|
||||
|
||||
build: $(BINARIES)
|
||||
build: $(BINARIES) $(RUNTIME_HELPERS)
|
||||
|
||||
banger: $(GO_SOURCES) go.mod go.sum
|
||||
$(GO) build -o ./banger ./cmd/banger
|
||||
|
|
@ -44,6 +45,10 @@ banger: $(GO_SOURCES) go.mod go.sum
|
|||
bangerd: $(GO_SOURCES) go.mod go.sum
|
||||
$(GO) build -o ./bangerd ./cmd/bangerd
|
||||
|
||||
$(RUNTIME_SOURCE_DIR)/banger-vsock-pingd: $(GO_SOURCES) go.mod go.sum
|
||||
mkdir -p "$(RUNTIME_SOURCE_DIR)"
|
||||
CGO_ENABLED=0 GOOS=linux GOARCH=amd64 $(GO) build -o "$(RUNTIME_SOURCE_DIR)/banger-vsock-pingd" ./cmd/banger-vsock-pingd
|
||||
|
||||
test:
|
||||
$(GO) test ./...
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue