fix(openclaw): trigger open-webui recreate on install; simplify volume layout#1035
fix(openclaw): trigger open-webui recreate on install; simplify volume layout#1035yasinBursali wants to merge 2 commits intoLight-Heart-Labs:mainfrom
Conversation
|
Audit follow-up after today's merge wave: this PR was approved in the backlog audit, but it now needs a small rebase before it can land. What changed: #1021 merged first, as planned. After that, GitHub reports this PR as conflicting. I reproduced the conflict locally by merging current Recommended fix: rebase on current |
…e layout The openclaw extension bundles an open-webui overlay that adds OPENAI_API_BASE_URLS + OPENAI_API_KEYS to register openclaw as a model provider. The install path uses `docker compose up -d --no-deps openclaw`, so the overlay env never reached the already-running open-webui container — the "openclaw in Open WebUI" feature silently broke until a manual `dream restart`. Adds a minimal _post_install_core_recreate helper in the host agent that recreates open-webui after a successful openclaw install. Helper is a no-op for other services; hardcoded rather than manifest-driven to keep scope tight. Wrapped in try/except so install success isn't blocked by a recreate failure (the progress write happens first). Also simplifies the openclaw volume layout. The openclaw-home named volume held only regenerated content (openclaw.json is rebuilt by inject-token.js on every container start) plus incidental caches — verified by inspecting the openclaw image filesystem. Removing it eliminates a named-volume/bind-mount overlap at /home/node/.openclaw/, simplifies the compose, and introduces zero data-loss risk for fresh installs. Existing installs: the orphaned openclaw-home volume can be reclaimed with `docker volume rm openclaw-home` — contents are non-critical. Phase 06 directory-setup comment updated to reflect the new behavior. Also drops a stale Volume Mounts row in openclaw/README.md that referenced a bind that never existed in compose.yaml. Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
0bd49a2 to
900bc71
Compare
|
Rebased on current |
…lainers PR Light-Heart-Labs#1021 dropped --no-deps from the install command path. Three comments in this branch's neighborhood still referenced the old form when explaining WHY the post-install core recreate is needed: bin/dream-host-agent.py:348 docstring of _post_install_core_recreate bin/dream-host-agent.py:1260 call-site comment in _handle_install tests/test_host_agent.py:328 comment block above TestPostInstallCoreRecreate The underlying causal claim is unchanged: docker compose up -d <ext> won't recreate already-running siblings without --force-recreate. Comments now describe the present-day install command accurately, with the missing --force-recreate flag named as the reason recreate is required, instead of the no-longer-passed --no-deps flag. No behaviour change. 45 host-agent tests still pass. Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
|
Follow-up commit |
Summary
open-webuiafter a successfulopenclawinstall so the overlay'sOPENAI_API_BASE_URLS+OPENAI_API_KEYSenv actually reaches the running container (previously silently broken until a manualdream restart).openclaw-homenamed Docker volume entirely. Verified againstghcr.io/openclaw/openclaw:2026.3.8— openclaw only writes two paths under/home/node/.openclaw/:openclaw.json(regenerated by inject-token.js every start) andworkspace/(bind-mounted). The named volume held only regenerated content../data/openclaw/homerow removed fromopenclaw/README.md.e9e992fa) drops three stale--no-depsreferences from explainer comments — PR fix(host-agent): start extension sidecars during install #1021 dropped that flag from the install codepath, so the comments now describe the present-day install command (up -d <ext>without--force-recreate) accurately.Platform Impact
Testing
pytest tests/test_host_agent.py→ 45 passed on the rebased branch (40 pre-existing including fix(host-agent): start extension sidecars during install #1021'sTestInstallStartCommandNoDepsthat came in via rebase + 5 new covering the_post_install_core_recreatehelper).docker compose -f docker-compose.base.yml -f extensions/services/searxng/compose.yaml -f extensions/services/openclaw/compose.yaml configmerges cleanly;grep -c openclaw-homein merged output → 0.make lintclean.docker exec dream-webui env | grep OPENAI_API_BASE_URLSshows openclaw URL without a full stack restart;docker inspect dream-openclawshows 3 bind mounts and no named volume.Existing-install migration
The old
openclaw-homeDocker volume becomes orphaned after upgrade. Contents are non-critical (regeneratedopenclaw.json+ misc caches). Users can reclaim disk withdocker volume rm openclaw-homepost-upgrade. No data loss.Review notes
_post_install_core_recreateis hardcoded toopenclaw(helper exists next todocker_compose_recreate). Kept scope-tight rather than introducing a manifest-levelpost_install_requires_recreatefield for a single use case.🤖 Generated with Claude Code