updates (#1562-5): survive updating itself — resume the rollout across the control plane's own restart, roll back on a failed post-swap health check #1567

Closed
opened 2026-09-17 15:23:47 +00:00 by matou-build-agent · 2 comments

Parent: #1562 — carrying contract: ADR 0248 + GOTCHAS #241

The hazard: the rollout runs inside the control plane it replaces, gateway last (ADR 0066). The persisted rollout state (internal/update store.save) must resume and finish across the idss-control-plane restart rather than strand applying forever; a control plane that fails its health check after the swap must restore the previous binary + control panel, count the attempt against the ADR 0067 two-attempt budget, and quarantine on a second failure. See GOTCHAS #241.

Acceptance:

  • control plane restarts mid-rollout (its own swap) → the rollout resumes and completes; it is never left applying forever;
  • failing health check after the swap → previous binary + control panel restored, attempt counts against the two-attempt budget, second failure quarantines.

Blocked by #1562-2 (the land/swap step) and #1562-4 (the driver).


Filed by agent under ADR 0174 (#1562 decomposition) — child of the fleet auto-update lane. Contract: ADR 0248. Veto anytime.

## Parent: #1562 — carrying contract: ADR 0248 + GOTCHAS #241 **The hazard:** the rollout runs inside the control plane it replaces, gateway last (ADR 0066). The persisted rollout state (`internal/update` `store.save`) must **resume and finish** across the `idss-control-plane` restart rather than strand `applying` forever; a control plane that fails its health check after the swap must restore the previous binary + control panel, count the attempt against the ADR 0067 two-attempt budget, and quarantine on a second failure. See GOTCHAS #241. **Acceptance:** - control plane restarts mid-rollout (its own swap) → the rollout resumes and completes; it is never left `applying` forever; - failing health check after the swap → previous binary + control panel restored, attempt counts against the two-attempt budget, second failure quarantines. Blocked by #1562-2 (the land/swap step) and #1562-4 (the driver). --- *Filed by agent under ADR 0174 (#1562 decomposition) — child of the fleet auto-update lane. Contract: ADR 0248. Veto anytime.*
Author
Member

swarm-claim host=elitebook-distributed-server-03 run=26030
(automated multi-host claim — lowest live claim id works this ticket)

swarm-claim host=elitebook-distributed-server-03 run=26030 (automated multi-host claim — lowest live claim id works this ticket)
Author
Member

close-report for #1567 — status success

✅ close-report gates passed — every claim verified against main; issue closed.

envelope
{
  "issue": 1567,
  "status": "success",
  "commits": [
    "19309e6459018a5cc68d3b59195c6dfe7f2e14a6"
  ],
  "changed_files": [
    "STATUS.md",
    "control-plane/cmd/control-plane/updates_scheduler.go",
    "control-plane/cmd/control-plane/updates_scheduler_test.go",
    "internal/update/export_test.go",
    "internal/update/rollback.go",
    "internal/update/rollout.go",
    "internal/update/store.go",
    "internal/update/resume.go",
    "internal/update/resume_test.go"
  ],
  "tests": [
    {
      "command": "go test ./internal/update/... ./control-plane/cmd/control-plane/ -count=1",
      "exit_code": 0
    },
    {
      "command": "go build ./...",
      "exit_code": 0
    },
    {
      "command": "go vet ./internal/update/... ./control-plane/cmd/control-plane/",
      "exit_code": 0
    },
    {
      "command": "nix develop .#go-ci --command golangci-lint run ./internal/update/... ./control-plane/cmd/control-plane/",
      "exit_code": 0
    }
  ],
  "criteria": {
    "control plane restarts mid-rollout (its own swap) → the rollout resumes and completes; it is never left `applying` forever": "internal/update/resume.go Orchestrator.Resume re-drives a persisted RolloutProgress checkpoint (internal/update/store.go, written in rollout.go before the deploy stages) to a terminal outcome, bypassing the window; proven by TestResume_FinishesRolloutAcrossControlPlaneRestart (self-swap crash leaves a checkpoint, a fresh orchestrator resumes to applied+converged, checkpoint cleared) and TestUpdateScheduler_ResumesSelfSwapOnBoot (the production driver's boot-time resume in updates_scheduler.go Run)",
    "failing health check after the swap → previous binary + control panel restored, attempt counts against the two-attempt budget, second failure quarantines": "resume re-runs the rollout core whose gateway (control-plane host) health failure triggers rollback.go's scope-matched generation rollback (previous binary + control panel) + recordFailure attempt count; proven by TestResume_PostSwapHealthFailureRollsBackAndBudgets (attempt 1 restores kauri at RollbackGeneration to a41f9c2, second self-swap resume quarantines at attempt 2 of 2)"
  },
  "summary": "The update rollout now persists an in-flight checkpoint and Orchestrator.Resume finishes it on control-plane boot — resuming across the gateway-last self-swap restart and rolling back a failed post-swap health check into the ADR 0067 budget.",
  "reason": "Both acceptance clauses are satisfied and seam-proven; the change is additive, revertible, and offline-provable (ADR 0174).",
  "blockers": []
}
**close-report** for #1567 — status `success` :white_check_mark: **close-report gates passed** — every claim verified against main; issue closed. <details><summary>envelope</summary> ```json { "issue": 1567, "status": "success", "commits": [ "19309e6459018a5cc68d3b59195c6dfe7f2e14a6" ], "changed_files": [ "STATUS.md", "control-plane/cmd/control-plane/updates_scheduler.go", "control-plane/cmd/control-plane/updates_scheduler_test.go", "internal/update/export_test.go", "internal/update/rollback.go", "internal/update/rollout.go", "internal/update/store.go", "internal/update/resume.go", "internal/update/resume_test.go" ], "tests": [ { "command": "go test ./internal/update/... ./control-plane/cmd/control-plane/ -count=1", "exit_code": 0 }, { "command": "go build ./...", "exit_code": 0 }, { "command": "go vet ./internal/update/... ./control-plane/cmd/control-plane/", "exit_code": 0 }, { "command": "nix develop .#go-ci --command golangci-lint run ./internal/update/... ./control-plane/cmd/control-plane/", "exit_code": 0 } ], "criteria": { "control plane restarts mid-rollout (its own swap) → the rollout resumes and completes; it is never left `applying` forever": "internal/update/resume.go Orchestrator.Resume re-drives a persisted RolloutProgress checkpoint (internal/update/store.go, written in rollout.go before the deploy stages) to a terminal outcome, bypassing the window; proven by TestResume_FinishesRolloutAcrossControlPlaneRestart (self-swap crash leaves a checkpoint, a fresh orchestrator resumes to applied+converged, checkpoint cleared) and TestUpdateScheduler_ResumesSelfSwapOnBoot (the production driver's boot-time resume in updates_scheduler.go Run)", "failing health check after the swap → previous binary + control panel restored, attempt counts against the two-attempt budget, second failure quarantines": "resume re-runs the rollout core whose gateway (control-plane host) health failure triggers rollback.go's scope-matched generation rollback (previous binary + control panel) + recordFailure attempt count; proven by TestResume_PostSwapHealthFailureRollsBackAndBudgets (attempt 1 restores kauri at RollbackGeneration to a41f9c2, second self-swap resume quarantines at attempt 2 of 2)" }, "summary": "The update rollout now persists an in-flight checkpoint and Orchestrator.Resume finishes it on control-plane boot — resuming across the gateway-last self-swap restart and rolling back a failed post-swap health check into the ADR 0067 budget.", "reason": "Both acceptance clauses are satisfied and seam-proven; the change is additive, revertible, and offline-provable (ADR 0174).", "blockers": [] } ``` </details>
Sign in to join this conversation.
No milestone
No project
No assignees
1 participant
Notifications
Due date
The due date is invalid or out of range. Please use the format "yyyy-mm-dd".

No due date set.

Reference
Matou/idss#1567
No description provided.