region HA runbook: Paul's approved floor, fixed_boxes, default-host prose
Before you start: the floor reads ha_handover 1 on every edges file and needs fixed_boxes (the ha_take paragraph was stale); a new fixed_boxes config key; and a note that an app enabled with --pool gets a default host born HA whose lease a DR-4 roll waits for. Copy approved by Paul 2026-11-11, verbatim. text_test records bucket_region, remote_said and remove_minimum as approved.
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2 files changed,
+9
−4
docs/region-ha-runbook.md+6 −3internal/grouproll/text_test.go+3 −1
CI failed — run details
diff --git a/docs/region-ha-runbook.md b/docs/region-ha-runbook.md| index 1f714babe..21061beea 100644 |
| --- a/docs/region-ha-runbook.md |
| +++ b/docs/region-ha-runbook.md |
| @@ -59,15 +59,16 @@ With neither provider nor token configured, `%s` is `CARLOS_DNSIMPLE_TOKEN missi |
| ### Before you start |
| -Every box that can send the member a request must run a release with held requests. The tool checks this before each transaction: every live box in the region, fixed forwarders included, must publish `ha_take: 1`, and for `replace` the release the launch template boots must be at or above `ha_floor`. If any box falls short, the tool prints "DR-4's lock-free rule applies" and does not drain. Replace only lock-free members then, as before. |
| +Every box that can send the member a request must run a release with held requests. Before each transaction the tool reads every edges file in the deployment, whatever its age, and each one must publish `ha_handover: 1`. Every box listed in the config's `fixed_boxes` must have an edges file. For `replace`, the release the launch template boots must be at or above `ha_floor`; for `roll`, so must the release you roll to. If anything falls short, the tool prints "DR-4's lock-free rule applies", names the box, and does not drain. Then change only members that hold no host's lease, as before. |
| -A fixed box that forwards into the region needs `CARLOS_REGION_HA=1` in its host.env. Without it, the box publishes no `ha_take`, and the region stays on DR-4. |
| +`ha_take`, which a fixed box publishes when its host.env sets `CARLOS_REGION_HA=1`, is not part of this check. It matters only for boxes that take hosts over from a member. |
| -Add three keys to the tool's JSON config: |
| +Add four keys to the tool's JSON config: |
| - `ha_floor`: the first release with held requests, for example `v0.35.0`. |
| - `data_bucket`: the region's data bucket, the same as the members' `CARLOS_HIBERNATE_BUCKET`. |
| - `data_prefix`: the prefix the hosts' `lock.json` files sit under, usually `instances`. |
| +- `fixed_boxes`: every fixed box in the deployment, by its box reference (`box-one`, `box-two`). A deployment with no fixed boxes sets `no_fixed_boxes: true` instead. Set one or the other, not both. |
| The operator's credentials need the grants in the region-host module's `group_operator_policy_json` output, and the region's session document must be at the release that adds the drain commands. |
| @@ -136,6 +137,8 @@ In that line, `hosts_moved` and `hosts_released` count the hosts that left the m |
| The region runs one member short from Standby until the replacement is healthy, usually a few minutes. With two members, the survivor carries every host meanwhile. |
| +An app enabled with `carlos instances enable --pool <pool>` gets its own default host (`<app>.<domain>`), and that host is born HA in the pool too. Deploying the app wakes it, so it holds a lease on a member even if nobody uses it. Under DR-4's lock-free rule the tool then refuses to roll or replace that member ("A lock still names the member: <host>") until the host goes idle and gives up its lease, about 15 minutes after its last request. Wait by reading the host's lock: it is free once it reads `released/v1;…` or names another box. A `released/v1` marker still carries the old member's instance ID, so judge by the prefix, not by the ID. |
| + |
| ### Resizing every member |
| Set `instance_type` in the region's group module and apply. The plan should show a new launch template version and no instance change. Set `group_launch_template_version` to that version and apply again. Then run `replace` once for each member, waiting for each to finish. |
diff --git a/internal/grouproll/text_test.go b/internal/grouproll/text_test.go| index 5990d811a..37b8617c3 100644 |
| --- a/internal/grouproll/text_test.go |
| +++ b/internal/grouproll/text_test.go |
| @@ -16,7 +16,9 @@ func TestTextRendersEveryKey(t *testing.T) { |
| // floor_fixed_both, drain_peers_many, floor_legacy and floor_population |
| // (held floor capability, 2026-11-10), and bucket_region (a bucket in |
| // another region than the group, 2026-11-10), and remote_said (the |
| - // member's own refusal, 2026-11-11), not yet copy-reviewed. |
| + // member's own refusal, 2026-11-11); bucket_region, remote_said and the |
| + // fixed remove_minimum approved in copy review 2026-11-11 (Paul, |
| + // unchanged). |
| if len(text) != 147 { |
| t.Fatalf("text has %d keys, want the 139 approved plus 8", len(text)) |
| } |