Skip to content

docs: clarify container SQLite storage and safe upgrades - #178794

Merged
steipete merged 1 commit into
mainfrom
upd/upd-l1746
Oct 20, 2026
Merged

steipete merged 1 commit into
mainfrom
upd/upd-l1746

Conversation

@steipete

Copy link
Copy Markdown
Contributor

What Problem This Solves

Container operators are not clearly told to keep SQLite state on local storage or stop the old Gateway before a replacement starts against the same volume.

Fixes #177288

User Impact

Operators get explicit local-storage requirements, one-replica guidance, and stop-first upgrade/recovery instructions for Compose, Swarm, and Kubernetes. This changes documentation only.

Why This Change Was Made

The existing owners already enforce SQLite journaling and exclusive startup repair. The docs now explain those requirements at storage selection and upgrade time, link Doctor's advisory network-storage warning (#178672), and retain the existing backup/rollback guidance. The Kubernetes page also explains that its explicit command bypasses the image entrypoint and therefore needs a separate Doctor pass when upgrading retained state.

Supersedes #177367, thanks @akshitkhokhani. Related: #177789.

Release-note context: clarify container SQLite storage and upgrade ownership, including Swarm/Kubernetes rollouts; thanks @akshitkhokhani.

Evidence

  • Source-audited docker-entrypoint.mjs, SQLite filesystem/journaling policy, current Doctor network-storage finding, Compose operations, and the Kubernetes manifest (replicas: 1, Recreate, explicit command).
  • pnpm docs:list passed; targeted node scripts/check-docs-mdx.mjs passed for all four pages. node scripts/docs-link-audit.mjs checked 15,758 internal links with zero broken links. Changed-file oxfmt and git diff --check passed.
  • node scripts/check-changed.mjs --base HEAD passed all ten selected docs-only checks. It selected no SQLite inventory, typecheck, runtime test, or import-graph lane; no production files or test consumers changed.
  • Independent Codex autoreview: no actionable P0–P2 findings. Simplification kept the storage explanation in its existing owner page, with short pointers from the VM/Kubernetes guides. Production/test LOC: 0/0; docs: +62/-1 across four existing pages.
  • Live local Docker proof used release image 2026.10.5, pinned to ghcr.io/openclaw/openclaw@sha256:f40d1e66fd14d8c5b49c832f4100f83b53fdc01f5108f7db11de38fd0ee6dbe5. Fresh task-owned HOME/state, synthetic token authentication, plugins and Control UI disabled, loopback-only host port publishing. The entrypoint printed Doctor complete. before Gateway startup; /healthz returned {"ok":true,"status":"live"} and /startupz returned {"ok":true,"status":"started"}. Stopped the container (exit 0), removed it, then started a replacement with the same mounts: Doctor and both probes passed again. Stopped and removed the replacement (exit 0).
  • Live-proof limits: no NAS, Swarm, or Kubernetes cluster was exercised; the network warning and orchestration settings were checked against source. The initial smoke fixture used unauthenticated LAN mode and was correctly refused with exit 78; corrected it to synthetic token authentication before the successful runs. This is a released-image startup/replacement smoke, not a new-image build or cross-version database migration test.
Live proof commands

The two bind sources were fresh task-owned directories; the state fixture selected local Gateway mode and synthetic token authentication.

docker pull ghcr.io/openclaw/openclaw:latest
docker run -d --name openclaw-upd-l1746-proof \
  -p 127.0.0.1::18789 \
  -v "$PWD/.artifacts/upd-l1746/docker-home:/home/node" \
  -v "$PWD/.artifacts/upd-l1746/docker-state:/home/node/.openclaw" \
  -e HOME=/home/node -e OPENCLAW_STATE_DIR=/home/node/.openclaw \
  ghcr.io/openclaw/openclaw@sha256:f40d1e66fd14d8c5b49c832f4100f83b53fdc01f5108f7db11de38fd0ee6dbe5 \
  node openclaw.mjs gateway --port 18789
docker port openclaw-upd-l1746-proof 18789/tcp
curl --fail --silent --show-error http://127.0.0.1:32791/healthz
curl --fail --silent --show-error http://127.0.0.1:32791/startupz
docker stop --time 30 openclaw-upd-l1746-proof
docker inspect openclaw-upd-l1746-proof --format '{{.State.Status}} exit={{.State.ExitCode}}'
docker rm openclaw-upd-l1746-proof
# Repeat docker run with the same mounts; replacement port was 32792.
curl --fail --silent --show-error http://127.0.0.1:32792/healthz
curl --fail --silent --show-error http://127.0.0.1:32792/startupz
docker stop --timeout 30 openclaw-upd-l1746-proof
docker inspect openclaw-upd-l1746-proof --format '{{.State.Status}} exit={{.State.ExitCode}}'
docker rm openclaw-upd-l1746-proof

Document local SQLite storage, single-replica stop-first rollouts, and Doctor ownership during container upgrades. Explain that the Kubernetes command bypasses the image entrypoint.

Fixes #177288. Supersedes #177367.

Co-authored-by: Akshit Khokhani <[email protected]>
@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.

@steipete
steipete marked this pull request as ready for review October 20, 2026 21:29
@chatgpt-codex-connector

chatgpt-codex-connector Bot commented Oct 20, 2026 •

Copy link
Copy Markdown
Contributor

Codex Review Summary

This comment shows the latest Codex review activity on this pull request.

Review Status Commit Review trigger
📝 Code Review ✅ Completed 2026-10-20T21:33:05.373181Z 6706402 Draft marked ready
ℹ️ About Codex in GitHub

Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you

  • Open a pull request for review
  • Mark a draft as ready
  • Comment "@codex review" or "@codex security review".

Codex reacts with 👀 while any review is running, comments if it has suggestions, and reacts with 👍 once all reviews finish with no findings.

@openclaw-barnacle openclaw-barnacle Bot added docs Improvements or additions to documentation docker Docker and sandbox tooling size: XS labels Oct 20, 2026

@chatgpt-codex-connector chatgpt-codex-connector Bot left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

💡 Codex Review

Here are some automated review suggestions for this pull request.

Reviewed commit: 6706402a30

ℹ️ About Codex in GitHub

Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you

  • Open a pull request for review
  • Mark a draft as ready
  • Comment "@codex review".

If Codex has suggestions, it will comment; otherwise it will react with 👍.

Codex can also answer questions or update the PR. Try commenting "@codex address that feedback".

Comment on lines +95 to +96
Keep `replicas: 1` and the provided `Recreate` strategy so replacements stop the
old pod before starting another Gateway against the same state. The PVC must

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

P2 Badge Restrict the Recreate guarantee to managed rollouts

When a pod is manually deleted or evicted, the Deployment's Recreate strategy does not serialize the replacement; the ReplicaSet may create a successor while the old pod is still terminating. If both pods land on the same node, ReadWriteOnce also permits them to access the same PVC, so this text incorrectly promises stop-before-start behavior for common restart scenarios. Qualify the guarantee to Deployment rollouts and retain explicit shutdown or ownership guidance for other replacements.

AGENTS.md reference: AGENTS.md:L9-L9

Useful? React with 👍 / 👎.

@steipete
steipete merged commit 2f7572a into main Oct 20, 2026
123 of 127 checks passed
@steipete
steipete deleted the upd/upd-l1746 branch October 20, 2026 21:34
github-actions Bot pushed a commit to Desicool/openclaw that referenced this pull request Oct 21, 2026
…aw#178794)

Fixes openclaw#177288. Docker and Kubernetes docs now explain that OpenClaw state must live on a local volume (not NFS/SMB; Doctor warns, openclaw#178672), that a single replica with stop-first rollouts is required, and how upgrade/Doctor ownership works, including Kubernetes entrypoint bypass. Supersedes openclaw#177367, thanks @akshitkhokhani.

Co-authored-by: Akshit Khokhani <[email protected]>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

docker Docker and sandbox tooling docs Improvements or additions to documentation size: XS

Projects

None yet

Development

Successfully merging this pull request may close these issues.

[Feature]: Containerized deployment docs — upgrade sequencing and SQLite storage requirements

1 participant