Skip to content

v0.57.0: the shell's exit code says how the work ended (breaking), and eleven example runbooks

Latest

Choose a tag to compare

@john-broadway john-broadway released this 28 Nov 02:34

What changed for an operator

Breaking, if a script of yours reads $? after proximo-core. Nothing to migrate otherwise.

The exit code says how the work ended. Until now proximo-core exited 0 for every call the vendor accepted. A snapshot whose task failed, a backup still running when --wait ran out and false run inside a guest all exited 0. Two codes are new:

Exit What happened
5 It ran and failed.
6 Not known to have finished. Look before you send it again.

A task that ends WARNINGS: n is a success, with the count in the answer. --wait 0 on a task or a guest-agent exec submits only and stays 0. A read still exits 0 whatever it found. The full table is in SETUP.md.

A script that tested $? after a mutation now sees 5 or 6 where it saw 0.

One thing this release does not change: a request that was sent and got no answer (a timeout, a dropped connection) still exits 4, and may have run.

Eleven example operator runbooks ship in packaging/runbooks/, written by kevwillow (#141). Copy the ones you want into your PROXIMO_RUNBOOKS_DIR. A test holds every one of them to the loader that serves a runbook.

Found by kevwillow's no-skill round (#142). Thank you.

The release

The shell's exit code says how the work ended. Breaking: this changes what a script sees. Found by kevwillow's no-skill round (#142, items 2, 3, 4, 30 and 34). proximo-core exited 0 for every call the vendor accepted, so a snapshot whose task failed, a backup still running when --wait ran out, and false run inside a guest all read as success, while SETUP called the exit codes the contract. Two codes are new. 5: it ran and failed: a task that did not end in success, a guest-agent command that exited non-zero or was killed, a container command (exec, psql) with a non-zero returncode other than 255, and an undo whose write failed. 6: not known to have finished: the wait ran out, the status could not be read after the call, or a guest command's exit carried no result. A status read that fails after the call is 6 and not 4: the work was accepted and may be running, and a script that sends again on 4 would run it twice. A container command that answers 255 is 6 and not 5: 255 is also ssh's own exit, so the connection may have dropped while the command ran. Two older cases do not move in this release, and SETUP now says so plainly: a mutation that was sent and got no answer (a timeout, a dropped connection) still exits 4, and a container command whose ssh timed out, or whose session broke after it started, still exits 2 with "may still be running" or "may have run" on stderr. Either may have run. --wait 0 on a task or a guest-agent exec submits only and stays 0; a container command runs to its end whatever --wait says. The answer is printed whatever the code. A script that tested $? after a mutation now sees 5 or 6 where it saw 0. A read still exits 0 whatever it found, a probe's or a log read's returncode included; the one exception is a task-status read with --wait, which now exits by the task's own end.

A task that ends in warnings completed. Same round, item 34. A task whose exit text is exactly WARNINGS: <number> read as failed: a Debian 13 container ends every start that way and is running. It now counts as a success on every door, the ledger says finished, and the answer carries the count as task.warnings. The vendor's words stay in exitstatus. What waits on a task follows: a safety snapshot that ends in warnings counts as landed, so the command or rollback it guards now runs where it was refused, and an undo whose write ends in warnings reports restored.

runbook list exits 2 while a file is refused. Same round, item 30. A folder whose only file was refused listed nothing and exited 0; runbook show and SETUP said 2. Breaking for a script that lists a folder with a refused file in it: the files that are served still print, the refusal is on stderr, and the exit is 2 until the file is fixed or removed.

Eleven example operator runbooks in packaging/runbooks/. Six change or test guests: restore_test.md proves a VM backup by restoring a copy with its links down, reading a known file back and removing the copy; ct_restore_test.md does the same for a container, reading the file through the container lane. snapshot_change.md changes a VM with a snapshot to fall back on, then keeps the change or proves the rollback. clone_dev_vm.md builds a dev VM from a cloud-init template and reads its hostname back. snapshot_hygiene.md finds old and leftover proximo_ snapshots and deletes only the ones the operator picks. decommission_guest.md removes a guest for good after checking protection, locks, backups, HA, backup and replication jobs. Five are read-only: backup_coverage.md (guests in no backup job or with no recent backup), backup_failures.md (backups that failed or warned, from their logs), storage_capacity.md (storage and thin pools nearly full, and overcommitted thin pools), cert_expiry.md (days left on each node certificate) and update_check.md (whether a node can get updates). From kevwillow, each followed by an AI agent on PVE 9.2.32 and checked against root's view. Issue #100.

Where to read more

  • CHANGELOG.md: every change, in full.
  • SETUP.md: the exit codes, and how runbooks are served.
  • SECURITY.md: what each control honestly holds.
  • #142: the round these fixes come from, and what is still open.