State Drift
Cheat sheet · https://pcornel.dk/topic.php?topic=6060
Answer
State Drift isolates divergence between authoritative desired state, automation-managed recorded state and live target state, identifying whether drift is intentional, external, stale-read or failed reconciliation.
Remember
- Drift detected ≠ target is wrong; desired source may be stale.
- No drift in cached state ≠ live target matches.
- Manual change ≠ unauthorized change in every case.
- Reconciliation succeeded ≠ workload behavior restored.
First checks
ansible-playbook site.yml --check --diff— CM driftterraform plan -refresh-only— IaC drift- Change audit for manual edits — source
Verify in this order
actual ≠ desired → diff → resolve
Where it usually breaks
Drift evidence proves disagreement among compared representations; it does not by itself identify which representation is authoritative or whether the difference is harmful.
Configuration/input → graph/state refresh → plan → provider API request → provider terminal result → resource read-back → effective service state → workload.
State Drift troubleshooting proof-boundary map
| Boundary | Healthy evidence | Suspicious evidence |
|---|---|---|
| Symptom / scope | Time window, immutable source/run identity, effective inputs and exact targets are explicit | Floating source, changed inputs or ambiguous targets destroy reproducibility |
| First failed boundary | Transport/auth/dependency/render/operation evidence identifies the earliest divergence | Investigation starts at the final error and skips earlier unproven boundaries |
| Effective outcome | Controller result is paired with target read-back and workload/service acceptance | Green execution state or changed symptom substitutes for effective-state verification |
| Recovery / closure | Minimal change restores the original test and regression/partial-state checks are clean | Broad retry or unrelated edits make the incident non-reproducible and hide residual state |
Read-only verification commands unless stated otherwise. Confirm syntax for your platform and release. Full reference: https://pcornel.dk/topic.php?topic=6060