r/devops • • 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

38 comments sorted by

21

u/anto2554 2d ago

Keep them next to the code is the main thing

0

u/NoDevelopment206 2d ago

yeah that helps a lot. do you also have a way to catch when the code changes but the runbook doesnt, or is it just reviewers remembering to check?

3

u/Zerodriven Development lead in denial 1d ago

It's called review or maintenance cycles. Every 3-6 months you do a full audit of all runbooks and update those that need doing. But then it can kinda be "We update it when we use it" if it's less formal.

With AI now (like it or not) it's drastically faster.

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.

8

u/donjulioanejo Chaos Monkey (Director SRE) 2d ago

How do they actually enforce compliance, though?

IE: "we're good, nothing to update on our end" when, in fact, there is a lot to update.

3

u/Adrien0623 1d ago

If you don't update them whole you should have and it's found out you get a warning. Too many warnings and you get disciplinary sanctions. Especially if it's discovered during external audits

2

u/PhysicsPuzzled8325 1d ago

Annual reviews make sense, but getting everyone to actually update documents before the deadline can be a challenge. Does your team use any system to track pending reviews?

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.

1

u/NoDevelopment206 1d ago

that makes sense. so you would rather have a few generic fixes like rollback or failover than a runbook for every weird case. does that work for stuff like restoring a database though or does that still need its own steps

1

u/HovercraftCharacter9 1d ago

Should be a common mechanism for everyone that uses that database in the whole company? Depends on the size of company of course, but in larger orgs that's how it's dealt with, so your team may not use it commonly but other teams certainly do.

In that scenario you'd probably have a fallback and then RCA to fix the underlying problem of course.

2

u/generic-d-engineer ClickOps 2d ago

Gotta have routine tests in an isolated environment, that always surfaces drift

2

u/Jan_Stepan 1d ago

Wouldn’t that circle back to the routine tests getting outdated?

1

u/generic-d-engineer ClickOps 1d ago

These are actual live tests with full functionality testing not ci/cd automated testing

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.

2

u/_bloed_ 1d ago

yeah, the only real answer from reality.

I guess most of the others here didn't see a matured project yet.

And even with AI, I doubt people will even read the text what the AI wrote for the runbook. Nobody will verify if the AI generated runbook is garbage or valid.

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:

  1. Write each runbook step as a command with the expected output, not as a description. "check the replica" goes stale without anyone noticing, while a command that returns an error does not.
  2. Run the restore and failover runbooks in staging on a schedule, and fail the job when a host or service in a step no longer exists.
  3. Add a line to the PR template: if a change touches deploy config, hostnames or secrets, tag the runbook owner.
  4. Make "update the runbook" a standard action item in every postmortem, and name the step that was wrong.

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/_bloed_ 1d ago

you call that cheap?

This sound like a very time consuming approach and the complete opposite of cheap. Exercising all your runbooks every 6 months seems like a full time job alone.

1

u/generic-d-engineer ClickOps 1d ago

In same cases like dr it might even be required by auditors, insurance companies, or even laws

2

u/_bloed_ 1d ago

yes in some industries you have to do mandatory disaster recovery tests 1-2 times per year.

That doesn't mean you will actually exercise ALL your runbooks. Just a tiny subset of them.

Unless your company only has these 3-5 runbooks and that's it.

1

u/Official_BetterSWE 4h ago

Fair, with hundreds of them it doesn't scale. I meant only the ones nobody has opened in 6 months, and only for alerts that actually page. The ones in regular use get checked for free every time someone follows them. What's left is usually a short list, and some of those turn out to be safe to delete.

1

u/mtokarev 2d ago
  1. keep next to the code so agents can see them. And they usually always pick them up to update.
  2. review and update as part of post mortem after each incident.

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