Relationships
#4870 A worker daemon enabled without --cache-dir re-enrolls as a new machine on every restart, so a single-enrollment token stops it
Opened by stack72 · 11/18/2026· Shipped 11/18/2026
swamp worker daemon enable without --cache-dir writes a unit whose worker connect gets a fresh temp cache directory per process (src/worker/connect.ts runWorker), so each start creates a new machine-id. With a default single-enrollment token (maxEnrollments 1), any restart of the daemon (systemctl restart, reboot, Restart=on-failure, or the background-update restart from swamp-club#4862) is refused with: Enrollment token 'pool': enrollment allowance exhausted, and systemd loops on the failure.
Repro (Debian bookworm systemd container, root): swamp worker token create pool2 --duration 1h; swamp worker daemon enable ws://127.0.0.1:9191 --token ; systemctl restart swamp-worker; journalctl -u swamp-worker shows the allowance-exhausted error.
The remote-execution design ties machine identity to a stable --cache-dir, and a daemon is meant to outlive its process, so the daemon should default to a stable cache directory.
Shipped
Click a lifecycle step above to view its details.
Sign in to post a ripple.