Repository navigation
Description
Summary
A managed, owner-authorized update from OpenClaw 2026.10.4 to 2026.10.8 on Linux/systemd user service passed candidate validation, then spent about 33 minutes in activation and failed before package swap with managed-service-stop-failed. The updater had already delivered "Restarting OpenClaw…" to the requester, but the Gateway recovered on 2026.10.4 and the requested upgrade did not occur.
Observed sequence
- Initial CLI update attempt from an OpenClaw-hosted shell refused with
managed-service-preflight (inside-gateway-process-tree); no restart was attempted. - Owner invoked
gateway update.run(managed handoff), run ID available locally. - Candidate checks
config,database-schema,node-runtime, andplugin-availabilityall passed. Candidate Gateway startup passed. - During activation, service policy refresh was skipped:
SERVICE_DEFINITION_UNKNOWN: [unsafe-permissions] The loaded service definition directory is group/world-writable. The selected systemd drop-in directory was mode 0775 and its drop-in file mode 0664; the main unit and its parent directories were not group-writable. - The updater reported
Gateway service stop timeout is 30000ms after policy refresh; preserving operator overrides and using lifecycle drain before stopping. - It ultimately failed:
managed-service-stop-failed; bounded diagnostic stderr saysOpenClaw state at $OPENCLAW_STATE_DIR/state/openclaw.sqlite is undergoing offline maintenance; retry when it finishes. openclaw update statusrecordsrequested 68.92s → staging 0.98s → validating 616.39s → activating 1978.73s. Recovery verified the Gateway serving 2026.10.4 with channels and HTTP ready. CLI still reports 2026.10.4; 2026.10.8 remains available.
The world/group-writable drop-in is an operator-side condition and will be corrected. I am not claiming it caused the SQLite maintenance refusal; both warnings were observed in this run.
Expected
If the existing state is in offline maintenance, detect or resolve the contention before a lengthy activation attempt, or fail promptly with an actionable owner/lease diagnostic. A "Restarting" notice should not imply the upgrade completed; the final failure notice should clearly state that the old version is still serving.
Environment
- Linux x64, npm global install, stable channel
- systemd user Gateway service, Node 24.22.1
- OpenClaw 2026.10.4 → 2026.10.8
- One observed production run; not independently reproduced
- No evidence of data loss or continuing Gateway outage
Related but distinct: #178291 reports an offline-maintenance authority failure after target activation; this run failed before the package swap at the managed-service stop.
Metadata
Metadata
Assignees
Labels
Type
Fields
Priority
Activity
clawsweeper commentedon Oct 28, 2026
Codex review: this still needs some work.
Summary
Keep this issue open: it documents a failed official-release update at the managed service-stop boundary, and existing maintenance fixes do not establish that this incident is resolved.
Reproducibility: no. high-confidence current-main reproduction is established: the report records one production failure, and source inspection confirms relevant boundaries without identifying the failing caller.
Next step
Identify the rejecting service-stop call and maintenance holder from sanitized receipts, then establish a failing installed-driver regression before selecting a repair.
Review details
Best possible solution:
The existing updater should complete or defer safely with holder diagnostics and clearly report that the old version remains serving when activation fails.
Do we have a high-confidence way to reproduce the issue?
No high-confidence current-main reproduction is established: the report records one production failure, and source inspection confirms relevant boundaries without identifying the failing caller.
Is this the best way to solve the issue?
Diagnose the installed updater's service-stop path before choosing a repair; candidate-only Doctor fixes or weakening live maintenance exclusion would not establish a solution.
AGENTS.md: found and applied where relevant.
Remaining risk / open question:
Codex review notes: model internal, reasoning medium; reviewed against b0966db12046.
Label changes
Label changes:
P1: An owner-authorized update between official releases failed after prolonged activation, leaving the requested upgrade incomplete despite successful recovery.impact:ux-friction: The restart notice preceded failure and the operator remained on the old version; no continuing outage or first-run blockage is established.maturity:stable: The primary owner is the M4 CLI surface's Updates and Upgrades category, with managed restart and recovery expectations defined by the update contract.issue-rating: 🦪 silver shellfish: Current issue advisory state selects this label.clawsweeper:no-new-fix-pr: Current issue advisory state selects this label.clawsweeper:needs-maintainer-review: Current issue advisory state selects this label.Label justifications:
P1: An owner-authorized update between official releases failed after prolonged activation, leaving the requested upgrade incomplete despite successful recovery.impact:ux-friction: The restart notice preceded failure and the operator remained on the old version; no continuing outage or first-run blockage is established.maturity:stable: The primary owner is the M4 CLI surface's Updates and Upgrades category, with managed restart and recovery expectations defined by the update contract.Evidence reviewed
Acceptance criteria:
What I checked:
src/cli/update-cli/update-command-execution.ts:294, b0966db12046)src/cli/update-cli/update-command-service-maintenance.ts:575, b0966db12046)src/cli/update-cli/update-command-execution-guards.ts:70, b0966db12046)src/infra/gateway-state-owner-record.ts:118, b0966db12046)src/cli/update-cli/update-command-maintenance-contention.test.ts:98, c57ba363c29c)How this review workflow works
@clawsweeper re-reviewcomments, exact-item GitHub events, scheduled/background review runs, or manual workflow dispatch.@clawsweeper re-reviewor@clawsweeper re-runon an open PR or issue to request a fresh review only.@clawsweeper reviewto request a fresh review only.@clawsweeper explainto ask for more context, or@clawsweeper stopto stop active automation.Reviewed October 28, 2026, 8:46 AM ET / 12:46 UTC.
steipete commentedon Oct 28, 2026
Thanks for the detailed timeline, @ndirazar. The phase durations made this tractable.
The 33 minutes in activation matches a known limit in the 2026.10.4 updater: the Gateway's lifecycle drain could use the whole 30-minute step budget before the stop was even attempted. #173788 caps that drain at 30 seconds. It landed on
mainon 2026-10-16, after 2026.10.8 was cut, so it isn't in 2026.10.8 either. It ships in the next release frommain.We could not reproduce the "undergoing offline maintenance" refusal on current
main. The backup and validation steps release their maintenance claim before activation, so we haven't identified what held it in your run. Two other gaps you hit are real, and a fix is in progress:systemctl stophas no timeout of its ownThe fix will also put the recorded maintenance holder into that failure reason.
If you still have the run locally, the
lastRunsection ofopenclaw update status --json, plus the Gateway journal lines around the refusal (journalctl --user -u <your gateway unit> --since "<time of the run>"), would show which process held maintenance. Please redact paths as needed.fix(update): clarify managed handoff failure notices
fix(update): bound service stop and report the serving version when m…
steipete commentedon Oct 28, 2026
The fix is merged in #186792 (473d221):
systemctl stop, for both user and system units, is bounded by the effective stop timeout plus 5 seconds. If it runs out, the update records the reason and goes to its normal recovery instead of waiting.Together with #173788 (the 30-second drain cap), this ships in the next release from
main. If an update fails the same way on that release, the notice andopenclaw update status --jsonwill show which process held offline maintenance. Please paste that here.dougbtv commentedon Oct 28, 2026
We hit a related managed-update failure today on Linux x64 with an npm-global install and systemd user Gateway, updating stable 2026.10.4 to 2026.10.8. Candidate admission, snapshots, Doctor, plugin/config convergence, candidate Gateway startup, and state cleanup all passed. Activation then failed before the package swap with global-install-failed: package-swap exited 1 because State schema inspection failed during shared database discovery. The updater preserved 2026.10.4; no data loss was observed. We had about 5 GiB free, so this was not a simple capacity shortfall. The Gateway was deliberately stopped afterward, so its later recovery-verification failure is not evidence of the original activation cause. This appears related to the old installed-driver update path, but distinct from the offline-maintenance service-stop failure described in this issue.
steipete commentedon Oct 28, 2026
Thanks, @dougbtv. You're right that this is distinct from the offline-maintenance stop failure.
"State schema inspection failed during shared database discovery" comes from the pre-swap activation checkpoint. At that point the installed 2026.10.4 updater runs its own inspection worker against your shared
state/openclaw.sqliteand the agent databases it registers. That sentence is a wrapper. The same step can fail for very different reasons: an unreadable or corrupt database or filesystem error, a worker that exited, was signalled or timed out, a lock held past the 30 s busy timeout, or running out of scratch space for the snapshot. Each needs a different fix. Both 10.4 and 10.8 keep the underlying cause in the run record (#164169), so it should be recoverable:lastRunfromopenclaw update status --json, especially the failed step'sfailureFacts,stderrTail,termination,signaland timing.Caused by:line and the last progress event, not just the first sentence.state/openclaw.sqliteand its-walfile, plus free space on both the state filesystem and the temp/snapshot filesystem (df -h ~/.openclaw "${TMPDIR:-/tmp}"). The snapshot can fill a smaller/tmpeven when the state disk has 5 GiB free.Redact paths and credentials as needed.
fix(update): bound service stop and report the serving version when m…