feat(ci-ephemeral): provisioner circuit breaker and alert #9
Loading…
Reference in a new issue
No description provided.
Delete branch "feat/provisioner-circuit-breaker"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
An expired Headscale preauth key made the provisioner create and destroy a billed VM every ~3.5 min indefinitely. Now 3 consecutive provisioning failures pause new cycles for 30 min, then allow one trial cycle; reaching running resets it. Failures count once per cycle; known causes (expired key, rejected SSH key, checksum mismatch) log a fixed hint without echoing output.
Breaker state is exported via node-exporter textfile metrics, and CIEphemeralProvisionerCircuitOpen (warning, for 2m) fires on it through the existing Alertmanager receiver. Tunables: ci_ephemeral_provisioner_breaker_threshold / _cooldown.
Tested: 10 unit tests (pytest roles/ci_ephemeral_provisioner/tests), promtool check rules on alerts.yml. Not run: a real provisioner cycle or alert delivery. Deploy needs services.yml for the provisioner and prometheus roles.
🤖 Generated with Claude Code