Skip to content

Sparewall 0.3.2

Choose a tag to compare

@github-actions github-actions released this 01 Nov 20:23
· 78 commits to main since this release
v0.3.2
b898d94

Warning

The install media for this release have been withdrawn (#196). The ISO and the raw disk image gave every install the same machine ID, and a node installed from them would lose its sealed secrets (the admin password, and anything set with sparewall secret) on its next upgrade.

  • Installing a new node: use 0.3.3's media.
  • Nodes upgraded to 0.3.2 from an earlier release are not affected.
  • Already installed from this release's media? Upgrade only to 0.3.3 or later. It gives the node a machine ID of its own and keeps its secrets.

Sparewall 0.3.2 makes upgrades and rollbacks safer. A node that can't read its configuration now stays reachable. A rollback runs the newest configuration the image can read. A pair upgrade downloads the new image before anything moves. Upgrades compare versions and won't go backwards by accident. It also fixes VRRP adverts being rewritten on a pair's static WAN block. And CI now upgrades from earlier releases before every release.

Fixes

  • A node that can't read its configuration stays reachable (#169, #173).

    • What happened: if the active document couldn't be read at boot, for instance after rolling back to an image that doesn't understand it, the node came up with no network at all.
    • The fix: it now boots into the bootstrap configuration, with its management port and SSH, so you can repair it remotely.
  • A rollback runs the newest configuration the image can read (#168, #182).

    • What happened: documents carried no notion of which release could read them. After an image rollback, an older release met settings it didn't know.
    • The fix: schema is now the oldest revision that can read a document (management.web needs revision 2). A node runs the newest generation it can read, and health says which generation it can't read and why.
    • In a pair: a node refuses a change its peer can't read, and tells you to upgrade the peer first.
  • VRRP adverts are no longer rewritten on a pair's static WAN block (#174, #183).

    • What happened: on a WAN with private node addresses, the egress SNAT could rewrite the master's own adverts, so the standby logged "Invalid VRRPv3 checksum" for every one.
    • The fix: adverts are now never tracked by conntrack, so the SNAT leaves them alone. If you added a raw rule with ip protocol vrrp notrack as a workaround, you can remove it.
  • A pair upgrade downloads the new image before anything moves (#175, #184).

    • What happened: a failed or slow download could leave a pair half upgraded.
    • The fix: sparewall upgrade downloads the image on the master first, with retries, and stops before touching either node if that fails. Then it upgrades the standby, hands over, and applies the image it already has. Running it again on a pair that's already current finishes at once, and operations explains how to finish a run that stopped halfway.
  • Upgrades compare versions and default to stable (#170, #185).

    • Versions: images now carry their version (org.sparewall.version), and sparewall upgrade --check shows it next to the node's own.
    • No accidental downgrades: an older image is refused unless you pass --allow-downgrade.
    • Channels: a node that tracks a build or release tag, as one installed from a release's ISO or disk image does, now follows stable.
    • Older images: images from 0.3.1 and earlier have no version label, so for them the comparison falls back to digests.

Testing

Before each release, CI now installs earlier releases from their published disk images and upgrades them to the candidate (#166, #186). This time that was 0.3.1 as a single node, and 0.3.1 and 0.2.0 as pairs. The tests check that the configuration, secrets, tokens and users carry over, that the gateway moves exactly once, that connections survive, and that bootc rollback works.

Upgrading from 0.3.1

Run sparewall upgrade on either node. The upgrade itself still runs with 0.3.1's code: the download-first order, the version checks and the stable default apply from your next upgrade on.

  • Installed from a release's ISO or disk image? A 0.3.1 node still tracks its own build, so set the channel once first with sparewall set updates.channel=stable. That doesn't upgrade anything, and in a pair it reaches both nodes. Then run sparewall upgrade as usual.
  • While a pair is half upgraded, if the configuration uses management.web, the 0.3.2 node refuses changes because its 0.3.1 peer can't read the new schema revision ("upgrade the peer first"). Make changes on the 0.3.1 node, or after both are upgraded.
  • Rolling back to 0.3.1 or older: only 0.3.2 and later fall back to a configuration they can read. Before bootc rollback to an older release, roll the configuration back to a generation from before the upgrade (sparewall history, then sparewall rollback <id>).

Upgrading from 0.2.0

Nodes on 0.2.0 can upgrade straight to 0.3.2, as CI now tests. The 0.3.0 notes cover what's new since 0.2.0, and the 0.3.1 notes cover what to expect: the degraded SELinux check after the /sysroot denial (sparewall health ack selinux), rolling back, and holding off on new settings until both nodes of a pair are upgraded.

What's Changed

  • fix(core): boot into the bootstrap configuration when the active document cannot be read by @silug in #173
  • feat(config): schema revisions, fallback to the newest readable generation, and refusing what the peer cannot read by @silug in #182
  • fix(nft): never track VRRP, so the WAN egress SNAT cannot rewrite a node's own adverts by @silug in #183
  • fix(upgrade): download the master's image before anything moves, and skip what is already done by @silug in #184
  • feat(upgrade): compare versions, refuse an older image, and default to stable by @silug in #185
  • test: upgrade from published releases in CI by @silug in #186

Full Changelog: v0.3.1...v0.3.2

Installing and upgrading

The image is ghcr.io/sparewall/sparewall:0.3.2 (sha256:b9b0ef2a30325653ba57f74b2fd70916fbee4ed4fa5c3cd59bdb69e39e9d9d53). Nodes on the stable channel are offered it once it is published.
Upgrade a node or a pair with sparewall upgrade (operations).

For a new install (getting started):

  • sparewall-0.3.2-x86_64.iso installs unattended to the first fixed
    disk of the machine it boots, only if that disk is blank; it
    stops at a disk with anything on it.
  • sparewall-0.3.2-x86_64.raw.zst is a disk image to write to a disk,
    and .qcow2 the same for virtual machines.
  • sparewall-0.3.2-x86_64-linux.tar.gz is the sparewall CLI, to
    manage nodes over SSH from a workstation; -aarch64-linux is
    the same for arm64 Linux, and -aarch64-darwin and
    -x86_64-darwin for a Mac (Apple silicon, Intel).
    Homebrew installs it on either: brew install sparewall/tap/sparewall.

Files named .partNN are pieces of one file (GitHub limits a file to
2 GiB): cat them together, in order.

Verifying the downloads

SHA256SUMS is signed with the project key (cosign.pub in the
repository) and lists every file, including each split file joined:

cosign verify-blob --key cosign.pub --bundle SHA256SUMS.sigstore.json SHA256SUMS
sha256sum -c --ignore-missing SHA256SUMS

The macOS CLI is signed ad hoc, not notarized: after unpacking a
downloaded tarball, clear its quarantine attribute with
xattr -d com.apple.quarantine sparewall (Homebrew does this itself).

The SPDX SBOMs list what is in the image and in each CLI build.