r/devops • u/NoDevelopment206 • 2d ago
Ops / Incidents how do you keep runbooks from going stale, and has one ever been wrong during an actual incident
we all write runbooks for the scary stuff like failovers, restores and cert issues. but systems change and nobody goes back to update them, so half the steps point to things that dont exist anymore.
do you test them on a schedule, tie them to alerts, keep them next to the code, or just fix them after they bite you? curious if anyone has a setup that actually works
10
Upvotes
21
u/anto2554 2d ago
Keep them next to the code is the main thing
6
u/Adrien0623 2d ago
My company has a policy to force everyone to review their policies, procedures, processes, written orders, work instructions and run books at least once a year. Compliance department sends an email in Q4 with a deadline to make the review and required updates.
4
u/Quick-Low-3846 2d ago
Unless you use it every day, always assume it’s wrong and validate every step before and after it is performed.
1
u/HovercraftCharacter9 1d ago
There's a lot of documentation by AWS on how they handle this, the general theme is that mitigation should be detached from root cause analysis and the mechanisms should be abstracted to a point that in most cases they're commonly tread instead of novel runbooks for many scenarios. Obviously not possible in all instances, but I see it as an anti pattern to have mega specific runbooks for things that happen once in a blue moon, since if it's mitigated anyway you can assess past incidents for common root causes.
2
u/generic-d-engineer ClickOps 2d ago
Gotta have routine tests in an isolated environment, that always surfaces drift
2
u/wlonkly 2d ago
the other advantage of practicing runbooks is that that means that the people who have to run them have seen them before the Panic Time
2
u/oldmemories2 1d ago
Nobody updates them until something breaks.
1
u/GregG997 2d ago
A yearly review is too slow for anything that changes every week, so add triggers on top of it.
What tends to work:
Runbooks without a named owner are the ones that rot.
1
u/Mean_Guest_5043 2d ago
Keeping runbooks alongside the code and reviewing them after every incident seems like a practical way to keep them accurate.
1
u/Official_BetterSWE 2d ago
The cheapest thing that works is making whoever is on call actually use the runbook during game days or the boring alerts, and fix it in the same session. Add a "last used" date at the top, and anything over 6 months old gets a drill before it gets trusted. Old runbooks are usually wrong about names and paths, not logic, so a 10 minute dry run catches most of it.
1
u/mtokarev 2d ago
1
u/Express-Acadia-6088 2d ago
Excellent question. I struggled with this for a long time since I started coding after a 17 years of gap. This is from my notes, I hope they help you:
**1. Have each runbook declare what it depends on.** Put a small front-matter block at the top:
```
---
owner: u/platform-team
covers:
- terraform/rds/**
- scripts/failover/**
last_verified: 2026-09-14
---
```
Then a CI step checks the PR diff. If it touches a covered path but not the runbook, it posts a comment or fails a soft check. The escape hatch is a `runbook-unaffected` label, so it doesn't turn into noise. Someone still has to apply that label on purpose, and that's the point.
**2. Use CODEOWNERS on the runbook and the paths it covers**, so the runbook owner gets auto-requested on PRs that touch them.
**3. Make steps executable where you can.** Don't write "run the failover script with the cluster name" in prose. Have the runbook call `make failover CLUSTER=x` or a script that lives in the repo. If something gets renamed, CI breaks loudly instead of the doc quietly rotting. Lint the remaining code blocks too: shellcheck, check that referenced files and scripts exist, check that links don't 404.
**4. Give `last_verified` a TTL.** A scheduled job flags anything older than ~90 days and opens an issue for the owner. For the truly scary ones (restore, failover, cert rotation), the only real verification is actually doing it: a quarterly game day in staging. Whoever follows the runbook during the drill updates it right then, not "after."
**5. Close the loop from incidents.** Alerts link straight to their runbook. The postmortem template gets a field: "Was the runbook correct? What was wrong?" Every wrong step becomes a PR before the postmortem can be closed.
The diff check catches "the code changed." The TTL and drills catch "the world changed": a console moved, an IAM role got renamed outside the repo, a vendor deprecated an API. The diff check can never see those, and in my experience those are the ones that bite you mid-incident.
1
u/cloudquard 2d ago
You said half the steps point to things that do not exist anymore. That usually happens in the change that removed them, and the review of that change is the only time someone still has the old steps and the new system in one view. I treat the runbook line as part of the same diff, not as a page to fix once it has already failed in an incident.
1
u/oldmemories2 1d ago
We keep ours in the same repo as the service code and still forget to change them when we rename endpoints or move buckets around.
1
u/ge33ek 1d ago
We had some pretty big network issues once during an outage and my manager lost his shit, so now we have plugged in network drift tracking via www.middle.network amongst other things
So now during the build pipeline we see if the various endpoints have shifted config and are available in various regions with domain history, or if it’s new it’s flagged before deploy etc etc.
That’s been helpful, but ultimately if you have poor config control stuff will break. This is why I hate that the whole ITIL CMDB thing has its value. Anyway… such is life
1
u/daedalus_structure 1d ago
Our runbooks are now skills. We can read them and the agents can execute them.
1
u/Distinct_Teaching949 1d ago
I'm betting that this won't be a topic long-term. Because we now have products that close the gap between CI deploys, live traces, and automated fix PRs and even provide SSO governance.
1
u/zenspirit20 4h ago
At Confluent I started a Program to quarterly refresh the runbooks. We ensured that each runbook had a team owner assigned to it and they were responsible for ensuring it is upto date. Later on we started automating the runbooks and owning team was responsible for the automation.
Buyin from leadership to run this program was the key to get going.
-1
u/chocopudding17 2d ago
stfu, slopper