reset

package
v0.15.0 Latest Latest
Warning

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

Go to latest
Published: Oct 16, 2026 License: Apache-2.0 Imports: 15 Imported by: 1

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func CleanupLocalDNSRules added in v0.2.3

func CleanupLocalDNSRules(log *slog.Logger) phases.Task

CleanupLocalDNSRules removes raw-table rules owned by LocalDNS.

func CleanupMachine

func CleanupMachine(log *slog.Logger, machineName string) phases.Task

CleanupMachine returns a composite task that removes all artifacts of an nspawn machine: its nspawn configuration and rootfs.

func CleanupNetwork added in v0.1.23

func CleanupNetwork(log *slog.Logger) phases.Task

CleanupNetwork returns a task that removes network interfaces and policy routing state left by unbounded-net.

func CleanupRoutes

func CleanupRoutes(log *slog.Logger) phases.Task

CleanupRoutes returns a task that removes policy routing rules and flushes routing tables used by unbounded-net WireGuard gateways.

func FirstRegisteredMachine added in v0.9.0

func FirstRegisteredMachine(ctx context.Context, log *slog.Logger) (string, error)

FirstRegisteredMachine returns the name of the first node slot that is registered, or the empty string if neither is. It inventories once rather than per slot, and like RegisteredMachine it reports an uninspectable host as an error rather than as a clean one.

This is for questions about the host as a whole, where either slot being occupied is what matters: whether it is safe to flush a ruleset shared by every machine in the netns, for instance. A caller asking about the node it is building or tearing down wants RegisteredMachine with that slot's name, because a machine in the other slot answers a question it did not ask.

func RegisteredMachine added in v0.9.0

func RegisteredMachine(ctx context.Context, log *slog.Logger, name string) (bool, error)

RegisteredMachine reports registration only after successful inventory. Bootstrap callers must not treat a missing inspection tool as a clean host.

func ReloadSystemd

func ReloadSystemd(log *slog.Logger) phases.Task

ReloadSystemd returns a task that runs systemctl daemon-reload to pick up unit file changes made by other reset tasks.

func RemoveBPFFSMount added in v0.1.11

func RemoveBPFFSMount(log *slog.Logger, machineName string) phases.Task

RemoveBPFFSMount returns a task that unmounts and removes the private bpffs mount used by the named nspawn machine.

func RemoveMachine

func RemoveMachine(log *slog.Logger, machineName string) phases.Task

RemoveMachine returns a task that removes the machine rootfs using machinectl and then force-removes the directory.

func RemoveNSpawnConfig

func RemoveNSpawnConfig(log *slog.Logger, machineName string) phases.Task

RemoveNSpawnConfig returns a task that removes the nspawn configuration file and the systemd service override directory for the named machine.

func RemoveNetworkInterfaces

func RemoveNetworkInterfaces(log *slog.Logger) phases.Task

RemoveNetworkInterfaces returns a task that removes all network interfaces created by unbounded-net: WireGuard interfaces (wg*), and tunnel/overlay interfaces (geneve0, vxlan0, ipip0, unbounded0, cbr0).

func RemoveWireGuardKeys

func RemoveWireGuardKeys(log *slog.Logger) phases.Task

RemoveWireGuardKeys returns a task that removes WireGuard private and public key files from /etc/wireguard.

func StopMachine

func StopMachine(log *slog.Logger, machineName string) phases.Task

StopMachine returns a task that stops the nspawn machine, waits for it to fully stop (up to 30 seconds), and force-terminates it if necessary.

Types

This section is empty.

Jump to

Keyboard shortcuts

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