holder

package
v0.2.0 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Jun 10, 2026 License: MIT Imports: 17 Imported by: 0

Documentation

Overview

Package holder is the server half of the holder protocol: one process owns one cluster — its shared network and every VM on it — so a cluster gets the same VM↔VM connectivity the library StartN gives (ADR-0008). Since ADR-0020 it is a thin backend-server: it links the real backend (vz/cloud-hypervisor) and does nothing else. It does NOT resolve images, build disks/seeds/fixtures, or manage the store — all of that runs client-side in the orchestrator, which drives this process over the control protocol. The helper receives ready paths and boots what the client tells it to.

It serves one control socket and one pidfile per member name, so the per-name CLI commands (ls/ssh/down/rm/status) address a member by talking to its socket, unaware that several members may live in one process. The cluster-level RPCs (createnetwork/reserve/boot-member) travel over the primary member's socket and are dispatched by name. Members can be stopped individually (the process survives until the last one leaves) and added at runtime (a stopped node re-joins the live cluster's network with a fresh reserve + boot-member).

It runs in two lifetime modes (ADR-0017, R4). DETACHED: a persistent session leader whose VMs outlive the spawning CLI (cattle-with-persistence). BOUND: an attached child of a test process, selected by FLEETBOX_PARENT_PID; it watches that parent (reparent poll) and a long-lived control connection (EOF), and reaps itself and its VMs the moment the test process is gone. On darwin this package is compiled only into cmd/fleetbox-helper (which links vz); on linux the CLI/test binary re-execs itself into Run.

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func GetRunnerVMNames

func GetRunnerVMNames() []string

GetRunnerVMNames returns the member names this holder was launched for.

func IsReconcile added in v0.2.0

func IsReconcile() bool

IsReconcile reports whether this process was launched as a one-shot reconcile helper (the Prune path).

func IsRunner

func IsRunner() bool

IsRunner returns true if the current process is a holder.

func RemovePidfile

func RemovePidfile(st *store.Store, name string) error

RemovePidfile removes a member's pidfile.

func Run

func Run() error

Run is the holder's main loop.

func RunReconcile added in v0.2.0

func RunReconcile() error

RunReconcile reclaims orphaned host network state and returns, serving no member. It is the helper's Prune entrypoint: it builds the real backend and runs its Reconcile (Linux bridges/taps/iptables/ip_forward; a no-op on vz/fake).

func WritePidfile

func WritePidfile(st *store.Store, name string) error

WritePidfile writes the current process PID for a member.

Types

This section is empty.

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL