Skip to content

[需求] 提供用户不感知的缓存-的开发实现-runner-container-hooks部分 - #46

Open
fly333sky wants to merge 1 commit into
mainfrom
issue-1133-from-main
Open

[需求] 提供用户不感知的缓存-的开发实现-runner-container-hooks部分#46
fly333sky wants to merge 1 commit into
mainfrom
issue-1133-from-main

Conversation

@fly333sky

Copy link
Copy Markdown

背景

[需求] 提供用户不感知的缓存(runner-container-hooks)· 开发流水线 · 开发预览阶段(代码已推 + 预览已部署 + UT 已补;门禁/对抗由 PR CI 异步跑)

改动内容

fix(ascend-ci-deployment): 评审第2轮修复 — cache-metrics HTTP 监听、squid Application 灰度注释、cn12-001/hk-001 CA 分发启用

issue #1133 第 2 轮实现总结(dev)

子仓:ascend-ci-deployment,分支 issue-1133-from-main,提交 c93a292c(基于第 1 轮 9103e66f)。
本轮仅针对评审 FAIL 的 3 条代码问题做修复;runner-container-hooks 无代码 bug,未改动。

改了哪些文件、怎么对应评审意见

1. cache-metrics sidecar 无 HTTP 监听 → pod 永久 NotReady(评审问题 1)

  • manifests/nginx-pypi-cache-new/cache-metrics.yaml
    • 脚本在渲染初始 metrics 后启动 httpd -f -p 9130 -h /www &(busybox httpd,
      /www/metrics 即 /metrics),readinessProbe tcpSocket:9130 不再永久失败;
      TERM/INT trap 清理子进程。httpd 崩溃由探针兜底(NotReady → 重建)。
    • 新增 CACHE_METRICS_{LOG,STATE,ROOT,PORT} env 覆盖(默认值 = 生产布局
      9130//www,生产行为不变),使测试可在沙箱中运行真实脚本。
  • tests/test-cache-metrics-e2e.sh(新增,评测要求的 e2e 防回归)
    • 从 ConfigMap 提取真实脚本执行,PATH 注入 httpd shim(有 busybox 用真
      busybox,否则 python3 http.server),断言:
      curl :9130/metrics 有页面(监听回归);② 初始 HIT=0;
      ③ 脚本确实以 httpd -f -p 9130 -h <root> 启动监听;
      ④ 追加 cache_status=HIT/MISS 日志行后计数与字节数(123+777=900)按轮推进。
    • 实跑结果:7 passed / 0 failed。

2. 8 个新集群 Application live 但未启用 secretDefinition → FailedMount(评审问题 2)

  • argocd/clusters/squid-rpardini/applications.yaml
    • 采用评审首选方案:gy-003/004/005/007、hk-ci、hb-003、hb-003-verl、
      hidevlab-k8s 共 8 个 Application 整体注释(与存量 3 集群同样处理)。
    • 文件头写明原因(chart 无条件挂载 squid-ca secret)与逐集群放开顺序:
      Vault key → values 启用 secretDefinition → 取消注释 Application;
      gy-006/cn12-001/hk-001 需先 argocd app import 采纳手动 helm release。
  • manifests/cache-ops-runbook.md §2:补充「Application 全部注释交付」的灰度
    说明,并把 step 1/2 改为与上述顺序严格对应。

3. cn12-001/hk-001 secretDefinition 被注释 → squid-ca-cert 永不分发(评审问题 3)

  • argocd/clusters/squid-rpardini/values-cn12-001.yaml:取消注释并启用,
    caNamespaces [squid, containerd-mirror, vllm-project](TASK-7 已在
    projects/vllm-project/vllm-ascend/linux-aarch64-cpu-4-cn12-001 打开注入)。
  • argocd/clusters/squid-rpardini/values-hk-001.yaml:同上,caNamespaces
    [squid, containerd-mirror, nv-action](TASK-7 已在
    other/nv-action/vllm-benchmarks/linux-aarch64-a2-1 打开注入)。
  • Vault key 采用与 gy-006 生产同路径同名、已确认存在的
    squid_ca_bundle_v3_pem / squid_ca_v3_pem(secrets/data/ascend/ci),
    而非第 1 轮注释块里的 squid_ca_*_pem(存在性无法从仓内证实)。

验证

  • bash tests/test-cache-metrics-e2e.sh → 7/7 PASS。
  • helm template + values-cn12-001 / values-hk-001:各渲染 4 个
    SecretDefinition(squid-ca@squid + squid-ca-cert@squid/containerd-mirror/
    vllm-project 或 nv-action,key=v3);values-gy-003 渲染正常。
  • kubectl kustomize manifests/nginx-pypi-cache-new 构建通过。
  • 修改后 YAML 全部 yaml.safe_load 通过;applications.yaml 为纯注释空文档。
  • tests/test-argocd-app-lint.sh:28/2 与改动前完全一致(2 个 R3 失败为
    main 上既有问题:lint 脚本根本没有实现 R3 规则,与本 issue 无关,未动)。

UT 清单

相关 Issue

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

AI 使用声明

当前 PR 是否有 AI 参与:

@opensourceways-bot

Copy link
Copy Markdown

Welcome To opensourceways Community

Hey @fly333sky , thanks for your contribution to the community.

Bot Usage Manual

I'm the Bot here serving you. You can find the instructions on how to interact with me at Here . That means you can comment below every pull request or issue to trigger Bot Commands.

Contact Guide

If you have any questions, please contact the SIG: infratructure ,
and any of the maintainers: @GeorgeCao-hw, @TangJia025, @pkking, @zhongjun2 ,
and any of the committers: @GeorgeCao-hw, @Goalina, @Hourunze1997, @JavaPythonAIForBAT, @KadenZhang3321, @LiYanghang00, @ccijunk, @drizzlezyk, @pkking, @rosecoffe, @tfhddd, @yao-xiaobai, @zhongjun2, @zkhzkhz .

@opensourceways-bot

Copy link
Copy Markdown

CLA Signature Pass

fly333sky, thanks for your pull request. All authors of the commits have signed the CLA. 👍

@opensourceways-bot

Copy link
Copy Markdown
检查项 状态
敏感信息扫描
安全编码扫描
漏洞扫描
开源license合规扫描
UT测试覆盖率
开发阶段设计文档检查
流水线链接 点击跳转查看日志

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants