Skip to content

Barn 1.0.0

Choose a tag to compare

@Vonng Vonng released this 04 Nov 23:18
· 21 commits to main since this release

Released on 2026-11-05. Barn 1.0.0 is the first stable release. GitHub's
releases/latest, the download installer without BARN_VERSION, and the
Homebrew formula select it.

Barn 1.0.0 freezes the command-line contract that 0.9.x converged on and
finishes a pre-release audit of destructive operations, data-disk recovery,
catalog integrity, and process cancellation. It embeds signed image catalog revision 2026110502, including Debian 13
image 20261103.2651.1 for amd64 and arm64.

Changes

  • Safer whole-deployment recreate. A recreate without node selectors
    refuses an inventory that no longer lists an existing node (conflict,
    reason nodes_removed, exit 4) before any VM stops; earlier releases
    destroyed the omitted node without recreating it. Remove a node explicitly
    with barn destroy NODE or add it back to the inventory. The confirmation
    lists every node the operation replaces, and the scope is checked again
    under the destruction lock (deployment_changed when the applied state
    changed during preflight).
  • Destroying the control node keeps the lab usable. The first remaining
    node becomes the control node, with a consistent state, so ssh-config,
    hosts, exec, and provision keep working. Update the inventory's control
    role, then run barn up to install its control SSH access. Barn refuses to
    destroy the control node, before deleting anything, when the successor has an
    unfinished prepare record that cannot be completed.
  • Data disks are reset only on recognized corruption. Disks with a
    partition table, a signature without a UUID, unsupported filesystem
    features, or an unknown checker failure keep their data and report a
    warning. An ext4 or XFS filesystem is reset only after the checker reports
    recognized corruption. Existing guests receive the updated helper on their
    next barn up readiness check.
  • Confirmations.
    • On a terminal, up, start, restart, and reload show the
      host-preparation plan and ask once before installing packages or the Barn
      network, as barn setup does. Without a terminal they still only report
      what is missing; run barn setup --yes for unattended preparation.
    • On a terminal, barn purge lists its scope and asks you to type purge.
      --yes (or --force) skips the question. Without a terminal it runs
      without a prompt, as before.
    • destroy, recreate, mac destroy, and mac recreate accept --yes as
      their confirmation flag. --force keeps working, and mac stop --force
      still powers the VM off.
  • Catalog integrity has its own exit code. A catalog signature or signed
    revision that does not verify exits 7 (integrity, reason
    catalog_signature or catalog_equivocation) instead of 1. Permission and
    I/O errors on a cached signature remain runtime failures (exit 1). Both
    official repositories share the embedded upgrade baseline, a new trusted
    signature over identical catalog bytes is accepted, and catalog commands keep
    working after barn image reset on an earlier version followed by an
    upgrade.
  • Cancellation reaches sudo. Cancelled commands receive SIGTERM, which
    sudo forwards, and Barn waits at most 10 seconds for the process and its
    inherited pipes. Descendants that ignore SIGTERM still need external
    supervision.
  • Host networking and Mac images. barn network uninstall keeps the
    global networkd unit state when other host links exist or exclusive Barn use
    cannot be established; the plan reports preserve_networkd and the applied
    report explains the decision in checks.networkd. Mac image pruning keeps
    bases referenced by interrupted recreates; a malformed recovery journal stops
    the cleanup until its references are known.
  • CLI.
    • Running barn without a command prints the complete help, as
      barn --help does; --json and --yaml keep the actions[] document.
    • Explicit --json/--yaml and --verbose override BARN_OUTPUT and
      BARN_VERBOSE, and help stays available when those variables are invalid.
  • Dependencies. Go 1.27.3, golang.org/x/net 0.62.0, and
    go.yaml.in/yaml/v3 3.0.6.

Compatibility

From 1.0.0, incompatible changes to the following require a new major version:

  • command names, aliases, flags, and argument grammar, including -- before a
    remote command;
  • exit codes and the structured error and reason values;
  • existing fields of --json and --yaml output (new fields may be added);
  • the inventory format and the meaning of existing vm_* keys;
  • BARN_* environment variables;
  • deployment and Mac state under BARN_HOME: a 1.x release reads the state of
    earlier 1.x releases and of 0.9.3 without recreating VMs.

Human-readable text, help wording, progress lines, and log contents may change
in any release. Scripts should use --json or --yaml and exit codes.

Two behaviors that scripts sometimes misread stay as they are in 1.x:

  • Without --yes, network and hosts install/uninstall only print the
    plan and exit 0 when stdin is not a terminal or the output is --json or
    --yaml. Check applied in the structured output, or pass --yes.
  • destroy and recreate without node arguments apply to the whole
    deployment.

Upgrade

The installer selects the latest stable release, verifies the archive against
the release's checksums.txt, and installs into ~/.local/bin without sudo:

curl -fLO https://github.com/pgsty/barn/releases/latest/download/install.sh
bash install.sh

Set BARN_VERSION=1.0.0 to pin this release. On macOS, run
brew upgrade barn (or brew install pgsty/infra/barn). On Linux, install the
DEB or RPM package from the release.

Upgrading from 0.9.3 requires no recreation; VM disks, SSH keys, state, and
configuration stay under ~/.barn. Stop macOS VMs before replacing the native
component. Check scripts for these changes:

  • catalog signature failures now exit 7 instead of 1;
  • a whole-deployment recreate exits 4 when the inventory omits an existing
    node;
  • interactive up asks before preparing the host;
  • purge asks on a terminal.

The Apple Silicon archive and Homebrew installation include the signed,
notarized Barn.app, CLI, and hosts helper. Linux arm64/amd64 and Intel macOS
provide the CLI and hosts helper; Linux guests use QEMU.

Known limitations

  • A malformed Mac recovery journal stops barn mac image ls, the space
    estimate in barn mac doctor, and image pruning until it is repaired.
  • One unreadable Mac machine state stops listing all machines; machines are
    still usable by name.
  • Linux guest shares on macOS hosts need a guest kernel with 9p support.

Support

Security fixes land in the latest 1.x patch release. 0.x releases receive no
further fixes; upgrade to 1.0.0. See
SECURITY.md.

See the installation guide,
the Linux quick start, and the
Mac guide.