mirror of
https://github.com/kevinveenbirkenbach/computer-playbook.git
synced 2026-11-06 19:01:54 +00:00
The data-root task runs on all five swarm nodes at once, and they are containers on one host kernel sharing its loop devices. losetup -f only names the next free one; by the time the following losetup attached it, a sibling had taken it - 'failed to set up loop device: Device or resource busy'. Claim with --find --show, which picks and attaches in one call, and retry with a short pause when a sibling wins anyway. The step runs before anything is pulled, so on some nodes docker is not installed yet and the closing 'systemctl start docker' died with rc=5, taking the whole task with it under set -e. The two systemctl stop calls above it had tolerated that all along. Start only when the unit exists, and report applied-pending-docker instead of applied so the job summary stops claiming a data root that no daemon has picked up yet. Co-Authored-By: Claude Opus 5 (1M context) <noreply@anthropic.com>