fix(runner): lower harbor repair schedule pressure [skip ci]

This commit is contained in:
Your Name
2026-07-01 09:54:55 +08:00
parent f1149e560e
commit 6ea19fb4c7
3 changed files with 31 additions and 10 deletions

View File

@@ -1,9 +1,25 @@
## 2026-07-01 — 09:47 Harbor remote repair schedule / SSH timeout pressure guard
**照主線修正的問題**
- 最新 readbackGitea public health `200`,但 public/internal Harbor registry `/v2``502`110 TCP `22/2222/5000/3000` open`ssh wooo@192.168.0.110` 仍 timeout。Gitea queue 主狀態仍為 `blocked_harbor_110_remote_control_channel_unavailable`
- `.gitea/workflows/harbor-110-local-repair.yaml` 原本每 10 分鐘 schedule 一次,即使 110 SSH control channel unavailable 也會反覆建立 repair run這不能修復 110只會增加 Gitea / runner 噪音。
- 將 Harbor 110 repair schedule 從 `*/10 * * * *` 收斂為 `17 * * * *`,並把 bounded SSH control check 改為 `ConnectTimeout=3`、command timeout `12s`workflow_dispatch 仍保留給 110 control path 恢復後的受控修復。
- profile test 固定上述低頻 / bounded timeout 規則,避免後續改回高頻 retry。
**驗證**
- `python3.11 -m pytest ops/runner/test_cd_controlled_runtime_profile.py -q` 通過。
- `python3.11 - <<'PY' ... yaml.safe_load(.gitea/workflows/harbor-110-local-repair.yaml) ... PY` 通過。
- `python3.11 ops/runner/guard-gitea-runner-pressure.py --root .` 通過。
- `git diff --check` 通過。
**邊界**:只改 Gitea Harbor repair workflow schedule / SSH timeout / tests / LOGBOOK未讀 secret / token / `.env` / raw sessions / SQLite / auth未 workflow_dispatch未重啟主機、未 restart Docker / Nginx / K3s / DB / firewall。
## 2026-07-01 — 09:44 Harbor repair SSH probe bounded retry
**照主線修正的問題**
- 最新 live truthCD `#4215` 仍因 Harbor public `/v2/` = `502` 失敗Harbor repair `#4212` 的具體 blocker 是 `harbor_110_remote_control_channel_unavailable`
- 188 non-110 runner lane 讀回 ready、host pressure 正常;但 188 → 110 bounded SSH probe 呈現間歇性,一次 `true` 可成功,下一次 `recover-110-control-path-and-harbor-local.sh --check` 又 timeout。
- `.gitea/workflows/harbor-110-local-repair.yaml` 對非寫入的 SSH probe / verifier 加 bounded retry預設 `6` 次、每次仍受 `ConnectTimeout=8``ServerAlive*`外層 `timeout 30` 限制,並輸出 `harbor_110_remote_ssh_probe_attempt=...` receipt。`run_recovery --apply-all` 不自動 retry避免半套用被重跑。
- `.gitea/workflows/harbor-110-local-repair.yaml` 對非寫入的 SSH probe / verifier 加 bounded retry預設 `6` 次、每次仍受 `ConnectTimeout``ServerAlive*` command timeout 限制,並輸出 `harbor_110_remote_ssh_probe_attempt=...` receipt。`run_recovery --apply-all` 不自動 retry避免半套用被重跑。
- follow-up 修正retry failure branch 必須在 `else` 內保存原始 `rc`,避免 shell `if` compound status 把連續 timeout 誤記為 `rc=0` / success。
**驗證**