Skip to content

docs(update): image-based hosts stay down after an upgrade until Doctor runs - #178347

Merged
obviyus merged 4 commits into
openclaw:mainfrom
ericcurtin:docs/image-based-upgrades
Oct 28, 2026
Merged

obviyus merged 4 commits into
openclaw:mainfrom
ericcurtin:docs/image-based-upgrades

Conversation

@ericcurtin

@ericcurtin ericcurtin commented Oct 20, 2026 •

Copy link
Copy Markdown
Contributor

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

  • Audited current schema refusal, Gateway exit 78, generated systemd restart prevention, pacman/pkg ownership detection, Doctor backup admission and managed-service restart paths.
  • The example matches the current diagnostic and agent schema version 38.
  • Passed focused Oxfmt checks for all three changed pages, docs:check-mdx, lint:docs, and git 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.

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.
@clawsweeper

clawsweeper Bot commented Oct 20, 2026 •

Copy link
Copy Markdown
Contributor

🦞👀
ClawSweeper picked this up.

Pull request received. I will update this pull request when review starts.

ClawSweeper review complete

ClawSweeper finished reviewing this revision. The review result is being finalized.

View the workflow run.

@openclaw-barnacle openclaw-barnacle Bot added docs Improvements or additions to documentation size: XS labels Oct 20, 2026
@clawsweeper clawsweeper Bot added clawsweeper:intake:docs Preliminary submission classification; full source review pending. P2 Normal backlog priority with limited blast radius. rating: 🦐 gold shrimp Decent PR readiness signal, but merge confidence is limited. status: ⏳ waiting on author ClawSweeper has contributor-facing work open and is waiting for author action. and removed clawsweeper:intake:docs Preliminary submission classification; full source review pending. labels Oct 20, 2026
@clawsweeper

clawsweeper Bot commented Oct 20, 2026 •

Copy link
Copy Markdown
Contributor

Codex review: needs maintainer review before merge.

What this changes

Documents 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.

  • Before: The Gateway exits 78 and stays stopped without image-host recovery instructions.
  • After: The guide explains running Doctor with the service identity and selected state, then restarting through the service owner if needed.

Review scores

Measure Result What it means
Overall readiness 🐚 platinum hermit (4/6) Useful, focused documentation supported by current source and the paired incident report, with no actionable finding.
Proof confidence 🌊 off-meta tidepool Not applicable: Every changed file is documentation; no runtime recovery or upgrade proof is required for this patch.
Patch quality 🐚 platinum hermit (4/6) No actionable review findings were identified.

Product

Kind: Docs · Worth it: Yes · Fix scope: Complete
User problem: Operators replacing OpenClaw through an OS package or image lack recovery instructions when required migrations leave the Gateway stopped.
Reason: The PR completes its documentation scope without claiming to implement unattended repair or close the paired feature request.

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
Reviewed head: 275702b69d85a7cd2fce071f953f8f41fffbd13a

Before merge

None.

Findings

None.

Agent review details

How this fits together

External 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]
Loading

Technical review

Best 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

  • System-package update guidance keeps the original intent (5d9a5ff: Avoid npm replacement of verified pacman/pkg-owned installations and direct updates through the package owner.)
  • Doctor versus ordinary startup keeps the original intent (2a1402c: Keep general repair in Doctor and invoke that owner automatically during official container activation.)
  • Update-method documentation placement keeps the original intent (056d140: Separate alternative update methods from the updating index and recovery reference.)

Security

None.

Evidence

What I checked:

PR surface

Docs +69. Total +69 across 3 files. Added test files: 0.

View PR surface stats
Area Files Added Removed Net
Source 0 0 0 0
Tests 0 0 0 0
Docs 3 71 2 +69
Config 0 0 0 0
Generated 0 0 0 0
Other 0 0 0 0
Total 3 71 2 +69

Labels

Label changes:

No label changes.

Label justifications:

  • P3: This PR improves recovery documentation for an advanced operator workflow without changing runtime behavior.
  • rating: 🐚 platinum hermit: Overall readiness is 🐚 platinum hermit; proof is 🌊 off-meta tidepool and patch quality is 🐚 platinum hermit.
  • status: 👀 ready for maintainer look: ClawSweeper has no concrete contributor-facing blocker left for this PR.

Rating scale

6/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.

Workflow

ClawSweeper edits this one comment on every review. Comment @clawsweeper re-review for a fresh review only. Repair and merge execution lanes are retired.

History

Review history (2 earlier review cycles)
  • reviewed 2026-10-20T11:10:23.209Z sha 1ec972c :: needs changes before merge. :: [P2] Preserve the service identity in the system-service recovery recipe | [P3] Limit automatic package-owner protection to detected managers
  • reviewed 2026-10-20T11:36:13.395Z sha 4ea852e :: needs maintainer review before merge. :: none

Reviewed October 27, 2026, 9:28 PM ET / October 28, 2026, 01:28 UTC (Revision 3).

@ericcurtin

Copy link
Copy Markdown
Contributor Author

@clawsweeper re-review

@clawsweeper

clawsweeper Bot commented Oct 20, 2026 •

Copy link
Copy Markdown
Contributor

🦞👀
Exact review queued.

Re-review progress:

@clawsweeper clawsweeper Bot added clawsweeper:intake:docs Preliminary submission classification; full source review pending. P3 Low-priority cleanup, docs, polish, ergonomics, or speculative work. rating: 🐚 platinum hermit Good normal PR readiness with ordinary maintainer review expected. status: 👀 ready for maintainer look ClawSweeper has no concrete contributor-facing blocker left for this PR. and removed P2 Normal backlog priority with limited blast radius. rating: 🦐 gold shrimp Decent PR readiness signal, but merge confidence is limited. status: ⏳ waiting on author ClawSweeper has contributor-facing work open and is waiting for author action. clawsweeper:intake:docs Preliminary submission classification; full source review pending. labels Oct 20, 2026
@ericcurtin

Copy link
Copy Markdown
Contributor Author

@RomneyDa @vincentkoc PTAL when you get a chance. Thank you!

@obviyus

obviyus commented Oct 28, 2026

Copy link
Copy Markdown
Collaborator

@clawsweeper re-review

@clawsweeper

clawsweeper Bot commented Oct 28, 2026 •

Copy link
Copy Markdown
Contributor

🦞👀
Exact review queued.

Re-review progress:

@clawsweeper clawsweeper Bot added clawsweeper:intake:docs Preliminary submission classification; full source review pending. and removed clawsweeper:intake:docs Preliminary submission classification; full source review pending. labels Oct 28, 2026
@obviyus
obviyus merged commit 2e72690 into openclaw:main Oct 28, 2026
85 of 89 checks passed
@obviyus

obviyus commented Oct 28, 2026

Copy link
Copy Markdown
Collaborator

Landed in 2e72690. Thanks @ericcurtin. The update docs now explain recovery on image-based hosts.

github-actions Bot pushed a commit to Desicool/openclaw that referenced this pull request Oct 28, 2026
…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]>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

clawsweeper:intake:docs Preliminary submission classification; full source review pending. docs Improvements or additions to documentation P3 Low-priority cleanup, docs, polish, ergonomics, or speculative work. rating: 🐚 platinum hermit Good normal PR readiness with ordinary maintainer review expected. size: XS status: 👀 ready for maintainer look ClawSweeper has no concrete contributor-facing blocker left for this PR.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants