mirror of
https://github.com/kevinveenbirkenbach/computer-playbook.git
synced 2026-11-08 03:38:23 +00:00
The script stops the daemon at :157-158 and starts it again only on the success path at :220. decline() exits 0 and set -e exits non-zero, and both walk past that start, so any other outcome leaves the host without docker. One of the three callers is test-deploy-host.yml:171, where the script runs on the GitHub runner itself rather than in a lab node container. An EXIT trap rather than a restart inside decline(), because decline is not the only affected exit: arm_autoclear's exit 1 and every set -e abort at mkdir, truncate, zfs create, mkfs, mount, btrfs subvolume create and the daemon.json writer sit in the same window. The trap is armed only after the stop, and DOCKER_STOPPED=false after a successful start makes it a no-op on the green path. A failed restart is reported rather than swallowed, so it cannot hide the failure that led there. This hazard predates 02dc003bb: the loop-device decline added in the commit before it has the same property. 02dc003bb widened it by putting a second decline behind the stop. Verified with a stubbed-PATH harness driving the real script: after a failed zpool create the call log contains `systemctl start docker`, and it comes after `losetup -d`, so the teardown still precedes the restart. REQUIRED=true still exits 1, the success path is unchanged. Co-Authored-By: Claude Opus 5 (1M context) <noreply@anthropic.com>