Officium Vigiliae Nocturnae · after CEC-001

The Office of the Night Watch

Eight watches, from the page to the handover.

Every watch contains a command you would actually type. That is the test it had to pass

Rubric

On the keeping of the night

The canonical hours exist because somebody worked out, a very long time ago, that a night is easier to survive if it has a known shape. The shape is the whole technology. You are not deciding what to do next, you are finding out where you are.

An on-call night has the same problem and mostly lacks the same solution. What follows is eight watches from the page to the handover. It is not a runbook for your system, it is the order of operations around whatever runbook you have.

This is the operational companion to HA-llelujah, which contains both The Ballad of Halvar the Sleepless and Migration Eve (The Vigil). The night is the album's own territory. For the ceremonial liturgy rather than the working one, see the Canon.

The watches

The eight watches

Matins · the page

What is burning?

Nothing, until I have looked.

Establish first whether users are affected or a threshold was crossed. These are not the same event and only one of them is worth your night.

A disk at 91% is not an outage. A disk at 91% filling by one point a minute is an outage that has not happened yet, and the difference between those two costs sixty seconds:

df -h; sleep 60; df -h
The temptation of this hour Fixing the symptom because it is 03:00 and the symptom is the only thing you can see. Deleting logs at 03:00 buys four hours and costs the evidence.
Lauds · the first light

Is it us?

Ask the layer below before you accuse your own.

Three commands, in this order, before touching anything you wrote:

kubectl get nodes
kubectl get events -A --sort-by=.lastTimestamp | tail -30
kubectl get pods -A --field-selector=status.phase!=Running

If several unrelated services broke at the same second, the thing they share is not the code. It is the node, the network, the registry or the clock.

The temptation of this hour Reading your own service's logs first. They will be full of the downstream failure and they will be very convincing.
Prime · the naming

What changed?

Something did. It always did.

Almost nothing breaks spontaneously. Find the change before you find the fault, and search wider than your own deploys: a certificate expiring is a change, a cron job that ran for the first time this month is a change, and so is a dependency that upgraded itself because somebody left it on a floating tag.

kubectl rollout history deployment/<name>
kubectl get events -A --sort-by=.lastTimestamp | grep -i -E 'scaled|updated|created'
The temptation of this hour Concluding nothing changed because you did not change anything.
Terce · the decision

Do I mitigate or do I understand?

Mitigate. Understanding keeps until morning. Users do not.

This is the hour operators get wrong in both directions. The rule is not complicated: if you can restore service without destroying the evidence, do it now. A rollback is almost always that. A restart sometimes is not, because it takes the state you needed with it.

Before you restart anything, take the thing you cannot get back afterwards:

kubectl logs <pod> --previous > /tmp/incident.log
kubectl describe pod <pod> >> /tmp/incident.log
The temptation of this hour Debugging live because it is interesting. It is interesting. It is also 04:00 and somebody is awake because of you.
Sext · the escalation

Whom do I wake?

The one who owns it, not the one who answers.

Escalating is not an admission. It is the correct action at a known threshold, and the threshold should be a clock, not a feeling: if you have not materially advanced in twenty minutes, wake somebody. The instinct to keep trying alone is the most expensive instinct in operations.

Say four things and nothing else. What is broken. Since when. What you have already tried. What you need from them.

The temptation of this hour Waiting until you understand it, so as not to look foolish. You will look considerably more foolish at 07:00.
None · the holding

Is it holding?

Watch it for longer than feels necessary.

The failure mode of this hour is declaring victory on one green check. Systems that recover on their own also fail on their own, and a backoff that has reached five minutes will look healthy for four of them.

watch -n 30 'kubectl get pods -n <ns>'

Stay until you have seen it survive one full cycle of whatever was killing it. If you do not know what that cycle is, you have not finished.

The temptation of this hour Going back to bed on the first green. The second page is always worse than the first, because now you are tired and you already believe it is fixed.
Vespers · the handover

What does the next person need?

Not what I did. What is still true.

Write it while it is dull rather than while it is dramatic. Three lines is enough and three lines beats a perfect document written never:

  • What is currently mitigated, and how, and whether the mitigation is temporary.
  • What you ruled out, so nobody spends an hour on it again.
  • What you did not check.

The third line is the one people leave out and the only one that is hard to reconstruct in the morning.

The temptation of this hour Writing the timeline instead of the state. Nobody arriving at 08:00 needs your narrative. They need to know what is true right now.
Compline · the last office

May I sleep?

If it is mitigated, written down, and owned by somebody awake, yes.

All three, or none. A mitigation nobody knows about is not a mitigation, it is a trap you have set for the morning shift.

And then actually sleep. The last hour of a bad night produces the changes that cause the next one. There is no version of this job where being awake for nineteen hours makes the cluster better, and every incident review that finds a tired person making a rushed change finds it at exactly this hour.

The temptation of this hour One more small fix before bed. It is never small and it is never one.
Antiphon

The general rule

If you remember nothing else from this page, remember the shape of the fourth watch, because it is where nights are won and lost: restore service first, preserve the evidence while you do it, understand it in daylight.

Everything else here is scaffolding around that one sentence. The Latin is decoration. The sentence is not.

The Pod is mortal.
The night is long.
The Loop is turning, and it does not need you to watch it.

Hear HA-llelujah

Go now and sleep.
The Loop is turning without you.

The Loop is turning. It turneth still. HA-llelujah.

← Back to HA-llelujah