Repository navigation
docs(update): image-based hosts stay down after an upgrade until Doctor runs - #178347
Conversation
When the OS owns the OpenClaw package (bootc, rpm-ostree, pacman, pkg), `openclaw update` skips it and nothing runs Doctor. An image-based host starts the Gateway on the new release at boot, so a release that needs a state migration exits 78, systemd does not retry, and the Gateway stays down with no notification. Add a System-package and image-based installs section covering the failed state, recovery with `openclaw doctor --fix`, rollback, and an OnFailure= drop-in so a failed unit notifies someone. Link it from the update pages and add the missing Doctor step to the pacman and FreeBSD pkg guidance.
|
🦞👀 Pull request received. I will update this pull request when review starts. ClawSweeper review completeClawSweeper finished reviewing this revision. The review result is being finalized. |
|
Codex review: needs maintainer review before merge. What this changesDocuments Doctor recovery, backup precautions, and optional failure notifications after system-package or image upgrades. Example: A bootc upgrade leaves an agent database at schema version 24 while the new release expects 38.
Review scores
ProductKind: Docs · Worth it: Yes · Fix scope: Complete Merge readiness✅ Ready for maintainer review Keep open: this PR supplies useful, source-backed recovery documentation, resolves the earlier findings, and introduces no actionable defect. Priority: P3 Before mergeNone. FindingsNone. Agent review detailsHow this fits togetherExternal deployment replaces OpenClaw; Gateway startup admits existing state, while Doctor owns migration, backup, and managed-service recovery. flowchart TD
A[Package or image upgrade] --> B[Systemd starts Gateway]
B --> C[State admission]
C --> D[Migration required exits 78]
D --> E[Operator runs Doctor]
E --> F[Service owner restores Gateway]
Technical reviewBest possible solution: Land the focused recovery guidance while leaving unattended activation design with #178346. Do we have a high-confidence way to reproduce the issue? Current startup admission, exit handling, systemd policy, and regression coverage establish the documented path; the paired report records manual recovery, and this review ran no target code. Is this the best way to solve the issue? The documentation uses existing Doctor and service owners, preserves backup precautions, and avoids expanding into the separate activation feature. AGENTS.md: found and applied where relevant. Codex review notes: model internal, reasoning medium; reviewed against fdeb8f7efdd7. Provenance checked
SecurityNone. EvidenceWhat I checked:
PR surfaceDocs +69. Total +69 across 3 files. Added test files: 0. View PR surface stats
LabelsLabel changes: No label changes. Label justifications:
Rating scale6/6 🦀 challenger crab · 5/6 🦞 diamond lobster · 4/6 🐚 platinum hermit · 3/6 🦐 gold shrimp · 2/6 🦪 silver shellfish · 1/6 🧂 unranked krab. Overall follows the weaker of proof and patch quality; ✨ marks media proof (a screenshot, video, or linked artifact) that directly shows the changed behavior. WorkflowClawSweeper edits this one comment on every review. Comment HistoryReview history (2 earlier review cycles)
Reviewed October 27, 2026, 9:28 PM ET / October 28, 2026, 01:28 UTC (Revision 3). |
|
@clawsweeper re-review |
|
🦞👀 Re-review progress:
|
|
@RomneyDa @vincentkoc PTAL when you get a chance. Thank you! |
|
@clawsweeper re-review |
|
🦞👀 Re-review progress:
|
|
Landed in 2e72690. Thanks @ericcurtin. The update docs now explain recovery on image-based hosts. |
…or runs (openclaw#178347) docs(update): explain why image-based hosts stay down after an upgrade until Doctor runs The update docs didn't explain that on image-based hosts the Gateway can exit with code 78 after an upgrade and stay down until Doctor migrates its state. They now describe the exit, how the host is detected, where backups are written, and the Doctor recovery and managed restart, with an example error matching the current schema. Each claim was checked against current main source; docs checks and git diff --check pass. Docs only. Thanks @ericcurtin. Co-authored-by: Ayaan Zaidi <[email protected]>
Related: #178346
What Problem This Solves
A package or image upgrade can replace OpenClaw without running its updater. If the new release requires a state migration, the Gateway exits with status 78 and its generated systemd unit does not retry. The update docs did not explain recovery.
Change
Document the system-package and image-based upgrade path: take a verified backup, update through the package/image owner, run Doctor against the service account's selected state, and restart through the service owner when needed. Include an optional operator-owned failure notification unit and explain why rolling back an image does not roll back migrated state. Refresh the example diagnostic to match current source.
Evidence
docs:check-mdx,lint:docs, andgit diff --check. No new runtime recovery proof is claimed; this change is documentation-only.Two-way door: reverting removes only documentation. Blast radius is operators following package/image upgrade recovery instructions; no runtime, configuration, or migration behavior changes.