Skip to content

fix(scan): scan-host 路由字段用错(cluster→runner)+ 同步机断言 - #166

Open
KadenZhang3321 wants to merge 1 commit into
mainfrom
fix/ledger-scan-host-runs-on
Open

KadenZhang3321 wants to merge 1 commit into
mainfrom
fix/ledger-scan-host-runs-on

Conversation

@KadenZhang3321

Copy link
Copy Markdown
Collaborator

resolve https://github.com/opensourceways/backlog/issues/2647

现象(首轮扫盘 run 45956441953)

  • hk001 / aiframe / mind3 / gy004 / gy005 五个 scan job 永远 queued;
  • cn12-001 "成功",但 runner 是 linux-aarch64-a3-2-sgl-lp7gz-runner-zrw4w——sgl 业务 ARC pod,不是同步机。结果假。

根因

prepare 把矩阵拆成 {cluster, runner} 两个字段,scan-host 却写了 runs-on: ${{ matrix.cluster }}:集群名多数不是 runner 标签(→永久排队),而 cn12-001 恰好撞上 ARC 池注册的集群标签(→静默跑错机器)。

修复

  1. runs-on/concurrency 统一改 matrix.runner(与 scan-arc 一致);
  2. 新增 Assert sync machine:同步机必有 /etc/profile.d/model-tools.sh,缺失即红——今后任何标签撞名导致的跑错机器都会大声失败,不会再假成功。

影响

  • 本 run 已推的分支/产物作废(我已 cancel);合入本 PR 后重新 dispatch,首轮真实台账差异届时才可信;
  • scan-arc 六个集群(sh001/sh002/gy001/gy003/wlcb001/cn12… 中除 cn12 外)本就正确,不受影响。

First dispatch (run 45956441953) exposed the bug: matrix carries
{cluster, runner} separately; scan-host used runs-on=matrix.cluster.
Consequences: hk001/aiframe/mind3/gy004/gy005 queued forever (no such
runner labels), while cn12-001 silently matched an sgl ARC job pod that
registers the cluster-name label and reported a bogus success scanning
the wrong machine.

- runs-on/concurrency now use matrix.runner (same as scan-arc);
- add Assert sync machine step: /etc/profile.d/model-tools.sh must exist
  on model-sync hosts, so any future label collision fails loudly instead
  of scanning the wrong disk.

resolve https://github.com/opensourceways/backlog/issues/2647
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant