fix(ops): converge openclaw compose project
All checks were successful
Ansible Lint / lint (push) Successful in 35s

This commit is contained in:
Your Name
2026-05-18 08:53:55 +08:00
parent 41a7ec93d6
commit 756fe92601
2 changed files with 37 additions and 2 deletions

View File

@@ -1,3 +1,38 @@
## 2026-05-18 | T41 188 OpenClaw runtime project 收斂
**背景**T39 已確認 188 `clawbot.service` 使用 `COMPOSE_PROJECT_NAME=clawbot`,但實際 `openclaw` / `litellm` container 仍掛在 compose project `clawbot-v5`,導致 systemd 每輪重啟都嘗試建立同名 container 並失敗。由於 `ollama` 帳號沒有可用 passwordless sudo不能直接落 root-owned systemd drop-in本階段改用 Docker layer 把 runtime 事實收斂到 systemd 已採用的 project name。
**修正**
- 188 host停止並移除 `clawbot-v5` project 下的 `openclaw` / `litellm`,再以 `COMPOSE_PROJECT_NAME=clawbot docker compose up -d --build` 重建。
- `infra/ansible/playbooks/188-ai-web.yml`:把 systemd drop-in 的 `COMPOSE_PROJECT_NAME` 從上一輪候選值 `clawbot-v5` 改回 production 已驗證的 `clawbot`,避免 repo 與 runtime 再次分叉。
**production evidence**
- `docker compose ls``clawbot` 為 running(2),不再出現 `clawbot-v5` project。
- `docker inspect openclaw litellm`
- `/openclaw project=clawbot status=running health=healthy`
- `/litellm project=clawbot status=running health=none`
- `systemctl show clawbot.service`
- `Environment=COMPOSE_PROJECT_NAME=clawbot`
- `ActiveState=active`
- `SubState=exited`
- `Result=success`
- `curl http://127.0.0.1:8088/health``{"status":"healthy","service":"ClawBot","environment":"production","telegram_bot":"connected"}`
- `GET https://awoooi.wooo.work/api/v1/health`API / PostgreSQL / Redis / Ollama / OpenClaw / SignOz 全部 `up`
**風險與後續**
- 本輪已把 OpenClaw restart-loop 從 production red/yellow debt 收斂為受控狀態;仍需後續用有效 sudo / Ansible vault 正式套用 root-owned drop-in避免只停留在 Docker layer 修復。
- Token hygiene 未完成repo 內明文已移除,但曾暴露 token 仍需輪換188 MOMO Telegram bot 的 httpx URL log 仍需回到 momo-pro source of truth 或正式 Ansible 管理後處理。
**目前整體進度**
- Alertmanager 低風險自動修復主線:約 98%。
- 完整 AI 自動化管理產品化:約 99%。
- 告警詳情/歷史/主卡/前端 deep-link 可追溯:約 99%。
- Telegram approval / reject callback 閉環:約 96%。
- Truth-chain 對「自動修復成功但驗證降級」的判讀:約 99%。
- 188 OpenClaw runtime hygiene約 90%。
- Token hygiene約 55%。
- Gitea infra-lint 可執行性100%。
## 2026-05-18 | T40 Gitea ansible-lint runner label 對齊
**背景**T39 `24f4324a` 已推 Gitea main 後,`ansible-lint` run `2243` 長時間停在 `queued`。Gitea API 顯示 job labels 為 `self-hosted`,但 repo runners 目前登錄 labels 為 `ubuntu-latest` / `ubuntu-22.04` / `ubuntu-24.04`,沒有 `self-hosted`。110 host runner service 本身仍 activerunner config 也以 `ubuntu-latest` 為主要 label。

View File

@@ -57,7 +57,7 @@
- docker
- openclaw
- name: "OpenClaw | 固定 systemd compose project 為既有 clawbot-v5"
- name: "OpenClaw | 固定 systemd compose project 為 clawbot"
ansible.builtin.copy:
dest: /etc/systemd/system/clawbot.service.d/10-compose-project.conf
owner: root
@@ -66,7 +66,7 @@
content: |
[Service]
Environment=
Environment=COMPOSE_PROJECT_NAME=clawbot-v5
Environment=COMPOSE_PROJECT_NAME=clawbot
RestartSec=30
notify: Reload systemd
tags: