Fleet Patching Simulation Lab.
Selective recovery across ten simulated hosts.
Problem.
A fleet job can finish with some hosts verified, some retryable and others requiring a person. Rerunning the entire inventory risks repeating successful work. I wanted to test how a controller could preserve individual outcomes and recover only the hosts with a safe next step.
Implementation.
- 01
Built a Python/SQLite checkpoint and event engine with explicit per-host outcomes and bounded reason codes. Ansible operates on local logical aliases, with synthetic install, reboot and health behavior.
- 02
Ran an initial campaign with seven verified hosts, two retryable failures and one human-required outcome. Selected only the two retryable hosts for a second inspected pass rather than rerunning the successful seven.
- 03
Checked deadlines on admission and before disruptive phases. Observation-only recovery can finish after the window, while interrupted running state requires reconciliation.
- 04
Added a separate Prometheus/Grafana lab stack and local receipt collector. Verified the actual failure webhook and a resolved receipt rather than treating a firing rule as proof of delivery.
Result.
The recovery pass finished with nine verified logical hosts and one requiring human attention. Each host retained exactly one synthetic install and reboot request, and successful hosts were not rerun. A local timing campaign measured about 10.4 seconds from failure to webhook receipt.
Eight policy tests, actual Ansible passes, retained SQLite/event evidence and a real local webhook receipt. The timing is one local measurement, not a human notification or service-level guarantee. The prototype uses two inspected passes; event-driven retries, backoff scheduling, real package/reboot operations, cluster circuit breakers and published GitHub execution remain unimplemented or unverified.
What I learned.
The alert initially fired without reaching the intended receiver. Checking the active receiver and recorded receipt exposed the gap. Grafana is useful for visibility and alerting, while durable per-host state and execution authority belong in the controller.
Questions about this project?
Email Binh ↗