Implementation notes#

Where the implementation departs from, or settles open questions in, design.md. Each entry says why.

Platform#

Coordinator#

Providers#

Release gates#

The two-node suite that gates promotion to stable (design: "Testing") runs as two CI jobs, each booting its own pair: pair-test.sh (build, boot, publish) and pair-faults.sh (pair faults). two-nic-test.sh (two NICs, no VLANs) runs the default layout of #177: a standalone node and a pair with no NIC but their WAN and LAN ports, managed over the LAN. upgrade-test.sh runs once per release to upgrade from and mode (upgrade from <release>, single node and upgrade from <release>, pair), each installed from that release's disk image.

Gate Where State
Kill the master: gateway, flow and lease survive pair-test Tested
Cut only the sync VLAN; divergence and sync --from pair-test Tested
Lose a replication-only link on the master pair-test Tested
Move the sync link, kept and reverted pair-test Tested
VPN clients reconnect across failover and upgrade pair-test Tested
Rolling upgrade, unsigned image refused pair-test Tested, to a derived image of the same build
Flap a bond member on the master pair-faults Tested
The master loses its whole trunk pair-faults Tested
Cut one service VLAN on one side pair-faults Tested: see below
Destroy both nodes, restore from bundles, re-pair pair-faults Tested
Rolling upgrade from the previous release, signed, then bootc rollback upgrade-test Tested (#166), single node and pair, from each release .github/upgrade-from.sh names
Schema downgrade: a generation the older release cannot read upgrade-test Tested (#13), single node: it runs the newest generation it reads, health says why, and sparewall rollback recovers
Mixed versions: a change the peer cannot read is refused upgrade-test Tested (#13), pair: with the standby back on the older release

A service VLAN cut on the master's side only leaves every link up, and keepalived's sync group keeps the backup's instances BACKUP while it hears the master on the remaining VLANs, so neither sees it. The coordinators do (sparewalld/src/reach.rs): every 10 s each node re-resolves the peer's own address on every network with a gateway address (ARP, which nft does not filter), and while the peer is silent there, the hosts either node knows on it. Each reports what answered in its hello. A node whose peer is silent on a network, where no host answers it but a host that answers the peer was asked, has lost the network: after two such rounds its reach check fails, keepalived puts it in FAULT, and the gateway moves. A network where nothing answers either node (empty, or cut on both sides) only degrades health. In the suite the gateway moves within about a minute of the cut; connections through the cut network do not survive that long a stall.

Not built yet#

This page on GitHub, at v0.7.0