carlos / platform Public

runbook: storage generations section, approved by Luna pass

The Storage generations section and the two new sentences in the
15-minute section, as reviewed by the delegated Luna copy pass
(2026-11-19; Paul's delegation via 8a3d302), applied verbatim, with
three statements corrected to match the code.
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
claude agent, operated by paul@keymail.dev pushed by paul@keymail.dev 1c57baa8c2a4ee6ee1d8809b3699b83af77b3314 parent d6353c4
1 file changed, +21 −5
  • docs/region-ha-runbook.md +21 −5
diff --git a/docs/region-ha-runbook.md b/docs/region-ha-runbook.md
index 6e67a8995..bf0be51c1 100644
--- a/docs/region-ha-runbook.md
+++ b/docs/region-ha-runbook.md
@@ -325,11 +325,11 @@ If the box role itself must read it, widen `ssm_parameter_arn` to include that o
When a box lets a host go without a clean release, after the host's database had started replicating, no box can wake the host again until 15 minutes after that release. Requests to the host get 503 with a `Retry-After` that counts down to that time.
-On a group with storage generations set to `fast`, a host with storage generations does not wait. See [Storage generations](#storage-generations).
+When the boxes in a group have `CARLOS_HA_GENERATIONS` set to `fast`, a host in storage-generations mode is woken at once after an unclean release instead of waiting 15 minutes; the folder design makes the wait unnecessary. See [Storage generations](#storage-generations).
This happens when the release's final sync fails or times out, when the write fence stops an instance during a storage outage, or when the upload of the host's files fails or runs out of time. The wait gives any upload the old box still had in flight time to land before another box starts writing the same data.
-The host's lock reads `released/v1;…`, its `carlos_release` (`carlos_release_g` on a host with storage generations) has `"clean": false` and neither `"settled": true` nor `"finalized": true`, and the journal of the box trying to wake it says `LEASE HELD` by that `released/v1` owner.
+The host's lock reads `released/v1;…`, its `carlos_release` field, or `carlos_release_g` on a host with storage generations, has `"clean": false` and neither `"settled": true` nor `"finalized": true`, and the journal of the box trying to wake it says `LEASE HELD` by that `released/v1` owner.
Nothing: the host wakes on the next request after the 15 minutes. Do not edit or delete the lock to hurry it, because that is exactly the race the wait prevents. If a host waits like this after every sleep, its release keeps failing at the same step. The old box's journal has the release error, starting `files:` or `final sync:`, which says which step failed and why.
@@ -344,7 +344,7 @@ Set `CARLOS_HA_GENERATIONS` in the group's host.env, one group at a time:
- `on`: Each wake copies the previous holder's data into a new folder before serving the host. Existing waits stay as they are.
- `fast`: The same, and a host whose holder released uncleanly or was terminated wakes as soon as [the termination is proven](superpowers/specs/2026-10-26-region-ha-without-claims-design.md#92-confirmation) instead of waiting 15 minutes.
-Turn on `on` first and run the drills before `fast`. Never turn it off once a host has `head.json`. Those hosts keep using generations whatever the setting says.
+Turn on `on` first and run the drills before `fast`. Never turn it off once a host has `head.json`. A host with `head.json` keeps using generations whatever the setting says because its lock stays in generations mode. But a host that has `head.json` and an ordinary lock, woken by a box with storage generations off, is refused with `lock_not_generations`.
### The floor: nothing below v0.39.0
@@ -352,7 +352,15 @@ Before switching a group on, set its `generations_floor` to v0.39.0. The group r
### A wake refused with ha_generation_refused
-The box refused to start the host because the previous holder's data does not reach the last safe point recorded for its release. The journal line names the reason: `no_l0`, `no_plan_to_l0`, `clean_marker_above_l0`, `empty_plan_with_data`, `file_over_5gib`, `head_missing` or `lock_not_generations`. L0 is the newest level of the host's database copy, where each uploaded change lands first. The host stays down and pages once an hour. Do not edit `head.json` or the lock to get past it.
+The box refused to start the host. The journal line names the reason:
+
+- `clean_marker_above_l0` and `no_plan_to_l0` mean the previous holder's data does not reach the last safe point recorded for its release.
+- `no_l0` and `empty_plan_with_data` mean the previous holder's copy holds no usable starting point.
+- `file_over_5gib` means one file is too large to copy.
+- `head_missing` means generation folders exist but `head.json` does not.
+- `lock_not_generations` means a box with storage generations off met an ordinary lock on a host that has `head.json`.
+
+L0 is the newest level of the host's database copy, where each uploaded change lands first. The host stays down and pages once an hour. Do not edit `head.json` or the lock to get past it.
To restore the host, choose a folder to restart it from and point the host at it with `carlos ops ha-generations`. Run each step on a box as the carlos user.
@@ -366,12 +374,20 @@ A host refused with `head_missing` has no `head.json`, and `carlos ops` has no r
### Old folders and the clock
-After each wake, the box deletes folders older than the 7-day restore window plus an hour. It also deletes folders that no `head.json` ever named once they are a day old. Age comes from the storage service's own clock, never the box's. A box with a wrong clock therefore cannot delete data still inside the window. If a storage response carries no time, the box keeps everything and logs `ha_generation_retire_failed`.
+After each successful wake, the box deletes folders older than the 7-day restore window plus an hour. It also deletes folders that no `head.json` ever named once they are a day old. Age comes from the storage service's own clock, never the box's. A box with a wrong clock therefore cannot delete data still inside the window. If the storage service returns no time on the lock writes, the wake fails its switch: nothing is deleted, and the host is not served by that wake. If only the switch write returns no time, the box skips deleting and logs `ha_generation_retire_failed`.
### Moves
Moves of a host with `head.json` are refused for now, before anything is copied. The follow-up is discussion #1253.
+| Change | Revision |
+|---|---|
+| Refusal reasons | Defined the distinct meaning of all seven reason codes. |
+| Generation mode | Explained why hosts keep using generations and added the ordinary-lock exception. |
+| Missing storage time | Distinguished lock-write wake failure from switch-write retirement failure. |
+
+Flags: None.
+
## Install chrony on a fixed box
Before G3 step 4 on the G3 card, install chrony on each named fixed box during an attended maintenance window. Use the reviewed `scripts/region-ha-g3/chrony-fixed-box.sh` through SSM as root, with approval for the named box. Group boxes already configure Amazon Time Sync at first boot.