Skip to content

v1.24.0: the getting-started guide works as written; safe power cuts after upgrades; upgrade alerts

Choose a tag to compare

@thatbagu thatbagu released this 20 Nov 18:21
16d857f

Highlights

Found by a readiness pass on a live 3-node cluster: a newcomer's walk through the getting-started guide, a security scan, VPN access tests with real peer keys, and power cuts during upgrades.

The getting-started guide works as written (#52)

  • nix flake check no longer fails on the template's example. The example names its node master with hostname mymaster, and four modules confused the two (attribute 'mymaster' missing).
  • Tools take a node's hostname too. install, reinstall, unlock and wake accept mymaster as well as master, as the guide writes it.
  • nix run .#init adds what's missing. It runs before vars.nix is filled in, so a node set to encrypt = true afterwards had no disk passphrase, and install stopped. Run init again: it adds the missing secrets and leaves the rest alone.

Power cuts right after an upgrade (#58)

On real hardware, a power cut even 3 seconds after a finished upgrade booted the previous system: the new boot menu was still in the FAT boot partition's write cache. GRUB's install now flushes it, and the same cut boots the new system.

Alerts for nixlab's own failures (#56)

With monitoring on, NixlabUpgradeFailed fires when a node's nightly upgrade fails, and NixlabUpgradeNotRunning when one hasn't run for 3 days. Before, a node silently stayed on an old version.

Security (#51)

  • lan.restrictClusterPorts (opt-in): the ports the nodes use among themselves (API, kubelet, flannel's unauthenticated VXLAN, MetalLB, NodePorts) answer only lan.subnet. Recommended once lan.subnet is right.
  • The docs say plainly that sudo needs no password, so your SSH key is root on every node.

The scan found nothing else open: the kubelet and the API reject anonymous requests, and SSH is keys-only.

Smaller fixes

  • Nextcloud knows its own address for links made outside a request, like emails from background jobs and federated cloud IDs. Before, those read localhost (#53).
  • Leftover pods get cleaned up. After a node restart, the pods that ran on it stayed listed (Error, Completed) next to their replacements. Masters now delete those hourly; Job pods stay (#54).
  • CI retries image-download flakes and caches the VM tests' images (#57).

Also verified live: VPN groups are enforced as documented (admin gets everything; family gets only DNS and Nextcloud), VPN auto-login creates the Nextcloud account on first visit, certificates renew, and DDNS follows the public IP.

Upgrading

Nothing to change in vars.nix. Once your lan.subnet is right, consider lan.restrictClusterPorts = true;.