Skip to content

reconciler: convergence loops

For Go code, follow the repository Go anti-pattern rules.

internal SPEC · overview: docs/architecture.md

Purpose

This package schedules convergence work. It owns no VM, image, snapshot, or traffic state.

Types

TypeResponsibility
VirtualMachineReconcilerRuns VM reconciliation passes.
ImageReconcilerCaches selected images and prunes unused images and staged snapshots.
MigrationReconcilerAdvances each active destination migration through its handshake.
passSchedulerRuns one pass at startup, on an interval, and after a nonblocking request.

Pass model

Architecture diagram
Loading diagram...

Each operation has its own timeout. The VM pass also limits concurrent operations. One slow VM cannot block all other VMs.

Errors are logged and a later pass retries safe operations. Errors are suppressed after context cancellation because they do not describe host health.

Ownership

metald owns each reconciler goroutine and the context that stops it. The VM manager owns every state decision and per-VM lock. The daemon traffic listener handles packet events separately.

AGPL-3.0