diff --git a/domaintest/.gitignore b/domaintest/.gitignore new file mode 100644 index 0000000..cbda00c --- /dev/null +++ b/domaintest/.gitignore @@ -0,0 +1,9 @@ +results-gy001.tsv +results-wlcb.tsv +results-x20-gy001-new.tsv +results-x20-gy001.tsv +results-x20-wlcb-new.tsv +results-x20-wlcb.tsv +results-pvd-gy001.tsv +results-pvd-wlcb.tsv +results-pvd-gy002.tsv \ No newline at end of file diff --git a/domaintest/REPORT-proxy-vs-direct.md b/domaintest/REPORT-proxy-vs-direct.md new file mode 100644 index 0000000..9ea2aa5 --- /dev/null +++ b/domaintest/REPORT-proxy-vs-direct.md @@ -0,0 +1,189 @@ +# 域名连通性 Proxy vs 直连 对比报告 (gy-001 / wlcb-001 / gy-002) — 修正版 + +> **本版为修正后的真实 squid 路径测试 (2026-09-04 08:03)**。旧版 (2026-09-03) 的 `--proxy http://127.0.0.1:3128` 在 squid pod 内命中的是 **registry-proxy (rpardini nginx)** 而非 squid —— squid 实际监听 `3129` (`http_port 3129 ssl-bump`)。旧版全部"proxy 劣化"分析测的是 nginx 出口, 结论不适用于生产 squid 路径, 仅供方法学复盘。 +> +> 本版测试条件与生产 CI 完全一致: **proxy 走 squid `127.0.0.1:3129`**, 且此时三集群 squid 已升级至 **`connect_timeout 5 seconds`** (chart 0.1.8), 即旧报告建议的修复已生效, 本版同时验证了修复效果。 + +## 测试方法 + +- 3 集群 × 92 实域名([ascend_ci_domains.json](ascend_ci_domains.json),跳过 `*.` 通配),每域每模式 **20 轮**。 +- 均在各自集群 `squid-cache-0` pod 的 **squid 容器**内执行 (`kubectl exec`): + - **proxy**: `curl -sk --proxy http://127.0.0.1:3129 --max-time 6 https://<域>/` + - **直连**: `curl -sk --max-time 6 https://<域>/` +- proxy 与直连跑在**同一个 pod / 同一节点 / 同一出口 NAT**, 外部可达性差异只来自 squid 处理逻辑(DNS 缓存、地址族回退、连接超时)与 curl 直连行为之差, 而非出口不同。 +- 判定: curl exit 0 = 成功(拿到任意 HTTP 响应,**含 squid 生成的 5xx 错误页,见方法学要点**);28=TIMEOUT / 6=DNSFAIL / 7=CONNFAIL。 +- 分类: **稳定**(proxy=直连=20/20) / **proxy劣化**(proxy<直连) / **直连劣化**(直连 注意: `mirrors.ustc.edu.cn` / `123.60.114.225` 经 squid 的成功是 **503 快速失败**, 不代表缓存/下载可用, 生产仍需域名白名单层面规避或换镜像源。 + +### 5. 间歇性域 (两轮内波动, 非结构性) + +- `results-receiver.actions.githubusercontent.com` (wlcb 19/19; gy-002 19/17)、`files.pythonhosted.org` (wlcb 19/19)、`apig.openlibing.com` (gy-002 直连 0/20 但复测 404 可达) —— 均属间歇抖动, 无固定方向。 + +## 结论 + +1. **`connect_timeout 5s` 修复被本版实测验证有效**:多 IP 域(goproxy.cn、OBS 多 IP、CDN 大池)的"proxy 系统性劣化"消失,剩余差值 ≤1 次为噪声。该配置**值得保留并推广到其余集群**。 +2. **0 个全挂 + proxy 稳定性反超直连**:生产 CI 走 squid 路径(`squid-cache:3128` → targetPort 3129)与直连出网相比不再有劣势,且在 DNS/地址族回退上更稳。 +3. **仍待处理的源站**(mirrors.ustc.edu.cn、123.60.114.225)经 squid 为 503 快速失败——对客户端友好但非真实可达;data.pyg.org 属间歇,非结构性。 +4. 上一版"作废声明"指出的 nginx-3128 误测问题,本版已用 squid-3129 全量重测,旧版结论(proxy 劣化/黑洞)**不适用于生产 squid 路径**,请以本版为准。 + +## 全量明细 (92 条, 列格式: `proxy/20 · 直连/20`) + +| # | 域名 | gy-001 | wlcb-001 | gy-002 | 分类 | +|---|---|---|---|---|---| +| 1 | devcloud.cn-north-4.huaweicloud.com | 20/20 · 20/20 | 20/20 · 20/20 | 20/20 · 20/20 | 稳定 | +| 2 | devrepo.devcloud.cn-north-4.huaweicloud.com | 20/20 · 20/20 | 20/20 · 20/20 | 20/20 · 20/20 | 稳定 | +| 3 | download.pytorch.org | 20/20 · 20/20 | 20/20 · 20/20 | 20/20 · 20/20 | 稳定 | +| 4 | download-r2.pytorch.org | 20/20 · 20/20 | 20/20 · 20/20 | 20/20 · 20/20 | 稳定 | +| 5 | pytorch-package.obs.cn-north-4.myhuaweicloud.com | 20/20 · 20/20 | 19/20 · 20/20 | 20/20 · 20/20 | 稳定 | +| 6 | pta-pr.obs.cn-north-4.myhuaweicloud.com | 20/20 · 20/20 | 20/20 · 20/20 | 20/20 · 20/20 | 稳定 | +| 7 | mindstudio-pr.obs.cn-north-4.myhuaweicloud.com | 20/20 · 20/20 | 20/20 · 20/20 | 20/20 · 20/20 | 稳定 | +| 8 | www.sqlite.org | 20/20 · 19/20 | 20/20 · 19/20 | 20/20 · 18/20 | 直连劣化 | +| 9 | sum.golang.google.cn | 20/20 · 20/20 | 20/20 · 20/20 | 20/20 · 20/20 | 稳定 | +| 10 | data.pyg.org | 12/20 · 0/20 | 12/20 · 0/20 | 20/20 · 0/20 | 直连劣化 | +| 11 | obs.cn-north-1.myhuaweicloud.com | 20/20 · 20/20 | 20/20 · 20/20 | 20/20 · 20/20 | 稳定 | +| 12 | op-svc-swr-b051-10-38-19-62-3az.obs.cn-north-4.myhuaweicloud.com | 20/20 · 20/20 | 20/20 · 20/20 | 20/20 · 20/20 | 稳定 | +| 13 | op-svc-swr-cn-north-4-backup.obs.cn-north-4.myhuaweicloud.com | 20/20 · 20/20 | 20/20 · 20/20 | 20/20 · 20/20 | 稳定 | +| 14 | obs.cn-north-9.myhuaweicloud.com | 20/20 · 20/20 | 20/20 · 20/20 | 20/20 · 20/20 | 稳定 | +| 15 | op-svc-swr-b051-10-147-7-14-3az.obs.cn-east-3.myhuaweicloud.com | 20/20 · 20/20 | 20/20 · 20/20 | 20/20 · 20/20 | 稳定 | +| 16 | op-svc-swr-cn-east-3-backup.obs.cn-east-3.myhuaweicloud.com | 20/20 · 20/20 | 20/20 · 20/20 | 20/20 · 20/20 | 稳定 | +| 17 | op-svc-swr-b051-10-230-33-197-3az.obs.cn-south-1.myhuaweicloud.com | 20/20 · 20/20 | 20/20 · 20/20 | 20/20 · 20/20 | 稳定 | +| 18 | op-svc-swr-cn-south-1-backup.obs.cn-south-1.myhuaweicloud.com | 20/20 · 20/20 | 20/20 · 20/20 | 20/20 · 20/20 | 稳定 | +| 19 | op-svc-swr-b051-10-205-14-19-3az.obs.cn-southwest-2.myhuaweicloud.com | 20/20 · 20/20 | 20/20 · 20/20 | 20/20 · 20/20 | 稳定 | +| 20 | obs.dualstack.cn-east-4.myhuaweicloud.com | 20/20 · 20/20 | 20/20 · 20/20 | 20/20 · 20/20 | 稳定 | +| 21 | lfs-cdn.openeuler.openatom.cn | 20/20 · 20/20 | 20/20 · 20/20 | 20/20 · 20/20 | 稳定 | +| 22 | artlfs.openeuler.openatom.cn | 20/20 · 20/20 | 20/20 · 20/20 | 20/20 · 20/20 | 稳定 | +| 23 | openeuler.openatom.cn | 20/20 · 20/20 | 20/20 · 20/20 | 20/20 · 20/20 | 稳定 | +| 24 | ru-repo.openeuler.org | 20/20 · 20/20 | 19/20 · 20/20 | 19/20 · 20/20 | proxy劣化 | +| 25 | fr-repo.openeuler.org | 20/20 · 20/20 | 20/20 · 20/20 | 20/20 · 20/20 | 稳定 | +| 26 | www.modelscope.cn | 20/20 · 20/20 | 20/20 · 20/20 | 20/20 · 20/20 | 稳定 | +| 27 | cdn-lfs-cn-1.modelscope.cn | 20/20 · 20/20 | 20/20 · 20/20 | 20/20 · 20/20 | 稳定 | +| 28 | gh-proxy.test.osinfra.cn | 20/20 · 20/20 | 20/20 · 20/20 | 20/20 · 20/20 | 稳定 | +| 29 | apig.openlibing.com | 20/20 · 20/20 | 20/20 · 20/20 | 20/20 · 0/20 | 稳定 | +| 30 | get.helm.sh | 20/20 · 20/20 | 20/20 · 20/20 | 20/20 · 20/20 | 稳定 | +| 31 | openlibing-codeql.obs.cn-southwest-2.myhuaweicloud.com | 20/20 · 20/20 | 20/20 · 20/20 | 20/20 · 20/20 | 稳定 | +| 32 | archive.ubuntu.com | 20/20 · 19/20 | 20/20 · 20/20 | 20/20 · 20/20 | 稳定 | +| 33 | security.ubuntu.com | 20/20 · 20/20 | 20/20 · 20/20 | 20/20 · 20/20 | 稳定 | +| 34 | gitee.com | 20/20 · 20/20 | 20/20 · 20/20 | 20/20 · 20/20 | 稳定 | +| 35 | ports.ubuntu.com | 20/20 · 20/20 | 19/20 · 20/20 | 20/20 · 20/20 | 稳定 | +| 36 | api.github.com | 20/20 · 20/20 | 20/20 · 20/20 | 20/20 · 20/20 | 稳定 | +| 37 | broker.actions.githubusercontent.com | 20/20 · 20/20 | 20/20 · 20/20 | 20/20 · 20/20 | 稳定 | +| 38 | pipelines.actions.githubusercontent.com | 20/20 · 20/20 | 20/20 · 20/20 | 20/20 · 20/20 | 稳定 | +| 39 | pipelinesghubeus4.actions.githubusercontent.com | 20/20 · 20/20 | 20/20 · 20/20 | 20/20 · 20/20 | 稳定 | +| 40 | results-receiver.actions.githubusercontent.com | 20/20 · 20/20 | 19/20 · 19/20 | 19/20 · 17/20 | 间歇 | +| 41 | github.com | 20/20 · 20/20 | 20/20 · 20/20 | 20/20 · 20/20 | 稳定 | +| 42 | codeload.github.com | 20/20 · 20/20 | 20/20 · 20/20 | 20/20 · 20/20 | 稳定 | +| 43 | objects.githubusercontent.com | 20/20 · 20/20 | 20/20 · 20/20 | 20/20 · 19/20 | 稳定 | +| 44 | objects-origin.githubusercontent.com | 20/20 · 20/20 | 20/20 · 19/20 | 20/20 · 19/20 | 直连劣化 | +| 45 | github-releases.githubusercontent.com | 20/20 · 20/20 | 20/20 · 20/20 | 20/20 · 20/20 | 稳定 | +| 46 | github-registry-files.githubusercontent.com | 20/20 · 19/20 | 20/20 · 20/20 | 19/20 · 20/20 | 直连劣化 | +| 47 | pkg-containers.githubusercontent.com | 20/20 · 20/20 | 20/20 · 20/20 | 19/20 · 20/20 | 稳定 | +| 48 | ghcr.io | 20/20 · 20/20 | 20/20 · 20/20 | 20/20 · 20/20 | 稳定 | +| 49 | github-cloud.githubusercontent.com | 20/20 · 20/20 | 20/20 · 20/20 | 20/20 · 20/20 | 稳定 | +| 50 | github-cloud.s3.amazonaws.com | 19/20 · 20/20 | 20/20 · 20/20 | 20/20 · 19/20 | proxy劣化 | +| 51 | dependabot-actions.githubapp.com | 20/20 · 20/20 | 20/20 · 20/20 | 20/20 · 20/20 | 稳定 | +| 52 | release-assets.githubusercontent.com | 20/20 · 20/20 | 20/20 · 20/20 | 20/20 · 20/20 | 稳定 | +| 53 | api.snapcraft.io | 20/20 · 20/20 | 20/20 · 20/20 | 20/20 · 20/20 | 稳定 | +| 54 | pipelinesghubeus1.actions.githubusercontent.com | 20/20 · 20/20 | 20/20 · 20/20 | 20/20 · 20/20 | 稳定 | +| 55 | pipelinesghubeus2.actions.githubusercontent.com | 20/20 · 20/20 | 20/20 · 20/20 | 20/20 · 20/20 | 稳定 | +| 56 | pipelinesghubeus3.actions.githubusercontent.com | 20/20 · 20/20 | 20/20 · 20/20 | 20/20 · 20/20 | 稳定 | +| 57 | pipelinesghubeus5.actions.githubusercontent.com | 20/20 · 20/20 | 20/20 · 20/20 | 20/20 · 20/20 | 稳定 | +| 58 | pipelinesghubeus6.actions.githubusercontent.com | 20/20 · 20/20 | 20/20 · 20/20 | 20/20 · 20/20 | 稳定 | +| 59 | pipelinesghubeus7.actions.githubusercontent.com | 20/20 · 20/20 | 20/20 · 20/20 | 20/20 · 20/20 | 稳定 | +| 60 | pipelinesghubeus8.actions.githubusercontent.com | 20/20 · 20/20 | 20/20 · 20/20 | 20/20 · 20/20 | 稳定 | +| 61 | pipelinesghubeus9.actions.githubusercontent.com | 20/20 · 20/20 | 20/20 · 20/20 | 20/20 · 20/20 | 稳定 | +| 62 | pipelinesghubeus10.actions.githubusercontent.com | 20/20 · 20/20 | 20/20 · 20/20 | 20/20 · 20/20 | 稳定 | +| 63 | pipelinesghubeus11.actions.githubusercontent.com | 20/20 · 20/20 | 20/20 · 20/20 | 20/20 · 20/20 | 稳定 | +| 64 | pipelinesghubeus12.actions.githubusercontent.com | 20/20 · 20/20 | 20/20 · 20/20 | 20/20 · 20/20 | 稳定 | +| 65 | download.openmmlab.com | 20/20 · 20/20 | 20/20 · 20/20 | 20/20 · 20/20 | 稳定 | +| 66 | rsproxy.cn | 20/20 · 20/20 | 20/20 · 20/20 | 20/20 · 20/20 | 稳定 | +| 67 | goproxy.cn | 20/20 · 20/20 | 20/20 · 20/20 | 20/20 · 20/20 | 稳定 | +| 68 | repo.anaconda.com | 20/20 · 20/20 | 20/20 · 20/20 | 20/20 · 20/20 | 稳定 | +| 69 | repo.mindspore.cn | 20/20 · 20/20 | 20/20 · 20/20 | 20/20 · 20/20 | 稳定 | +| 70 | repo.oepkgs.net | 20/20 · 20/20 | 20/20 · 20/20 | 20/20 · 20/20 | 稳定 | +| 71 | repo.openeuler.org | 20/20 · 16/20 | 20/20 · 19/20 | 20/20 · 18/20 | 直连劣化 | +| 72 | mirrors.ustc.edu.cn | 20/20(503) · 0/20 | 20/20(503) · 0/20 | 20/20 · 20/20 | 直连劣化 | +| 73 | lfs-cdn.gitcode.com | 20/20 · 20/20 | 20/20 · 20/20 | 20/20 · 20/20 | 稳定 | +| 74 | cn-north-4-octopus-gitcode-runner.obs.cn-north-4.myhuaweicloud.com | 20/20 · 20/20 | 20/20 · 20/20 | 20/20 · 20/20 | 稳定 | +| 75 | gitcode.com | 20/20 · 20/20 | 20/20 · 20/20 | 20/20 · 20/20 | 稳定 | +| 76 | atomgit.com | 20/20 · 20/20 | 20/20 · 20/20 | 20/20 · 20/20 | 稳定 | +| 77 | mirrors.huaweicloud.com | 20/20 · 20/20 | 20/20 · 20/20 | 20/20 · 20/20 | 稳定 | +| 78 | mindcluster.obs.cn-north-4.myhuaweicloud.com | 20/20 · 20/20 | 20/20 · 20/20 | 20/20 · 20/20 | 稳定 | +| 79 | mirrors.aliyun.com | 20/20 · 20/20 | 20/20 · 20/20 | 20/20 · 20/20 | 稳定 | +| 80 | mirrors.tuna.tsinghua.edu.cn | 20/20 · 20/20 | 20/20 · 20/20 | 20/20 · 20/20 | 稳定 | +| 81 | repo.huaweicloud.com | 20/20 · 20/20 | 20/20 · 20/20 | 20/20 · 20/20 | 稳定 | +| 82 | mindstudio-pkg.obs.cn-north-4.myhuaweicloud.com | 20/20 · 20/20 | 20/20 · 20/20 | 20/20 · 20/20 | 稳定 | +| 83 | files.pythonhosted.org | 19/20 · 20/20 | 19/20 · 19/20 | 20/20 · 20/20 | proxy劣化 | +| 84 | mindx-package.obs.cn-north-4.myhuaweicloud.com | 20/20 · 20/20 | 20/20 · 20/20 | 20/20 · 20/20 | 稳定 | +| 85 | pypi.tuna.tsinghua.edu.cn | 20/20 · 20/20 | 20/20 · 20/20 | 20/20 · 20/20 | 稳定 | +| 86 | mindie-pr.obs.cn-north-4.myhuaweicloud.com | 20/20 · 20/20 | 20/20 · 20/20 | 20/20 · 20/20 | 稳定 | +| 87 | pypi.org | 20/20 · 19/20 | 20/20 · 20/20 | 20/20 · 20/20 | 稳定 | +| 88 | build-env.obs.cn-north-4.myhuaweicloud.com | 20/20 · 20/20 | 20/20 · 20/20 | 20/20 · 20/20 | 稳定 | +| 89 | ppa.launchpad.net | 20/20 · 20/20 | 20/20 · 20/20 | 20/20 · 20/20 | 稳定 | +| 90 | obs-community.obs.cn-north-1.myhuaweicloud.com | 20/20 · 20/20 | 20/20 · 20/20 | 20/20 · 20/20 | 稳定 | +| 91 | ascend-cann-open.obs.cn-north-4.myhuaweicloud.com | 20/20 · 20/20 | 20/20 · 20/20 | 20/20 · 20/20 | 稳定 | +| 92 | 123.60.114.225 | 20/20(503) · 0/20 | 20/20(503) · 0/20 | 20/20(503) · 0/20 | 直连劣化 | diff --git a/domaintest/REPORT-x20.md b/domaintest/REPORT-x20.md new file mode 100644 index 0000000..3e32e2c --- /dev/null +++ b/domaintest/REPORT-x20.md @@ -0,0 +1,153 @@ +# 域名连通性 ×20 轮压测报告 (gy-001 / wlcb-001 / gy-002) + +> 修正版生成时间: 2026-09-03 | 每个域名 **20 轮**「DNS解析 + 经 squid 代理 curl」, 数据源: [ascend_ci_domains.json](ascend_ci_domains.json) (共 92 条, 跳过 `*.` 通配) + +## ⚠️ 测试方法修正说明 (重要) + +**旧版报告的代理端口用错了, 本报告为修正后的真实数据。** + +| 版本 | 代理端口 | 实际命中的组件 | 结论有效性 | +|---|---|---|---| +| **旧版 (作废)** | `127.0.0.1:3128` | 同 pod 的 **registry-proxy (rpardini nginx)**, 不是 squid | ❌ 无效 (测的是 nginx 出口) | +| **本版 (修正)** | `127.0.0.1:3129` | **squid** (`http_port 3129 ssl-bump`) | ✅ 真实 CI 路径 | + +架构依据: Service `squid-cache:3128` → `targetPort 3129` → squid; 而 pod 内 `127.0.0.1:3128` 是 registry-proxy (也是 squid `cache_peer` 的上游, 见 squid.conf `cache_peer 127.0.0.1 parent 3128 name=registryproxy`)。CI 客户端经 Service 3128 会被 DNAT 到 3129, 与 pod 内直连 3129 **等价**。 + +**旧版结论被推翻**: 旧报告里的 `mirrors.ustc.edu.cn / 123.60.114.225 / data.pyg.org / github.com` 等"黑洞/0-20"其实是 **nginx 出口能力弱** 的假象, 换到 squid 真实路径后几乎全部可达(见下)。脚本已同步修正: [x20-remote.sh](x20-remote.sh) / [test-domains.sh](test-domains.sh) / [test-domains-x20.sh](test-domains-x20.sh)。 + +## 测试方法 + +- 在 **gy-001**(squid `172.16.0.37`) / **wlcb-001**(squid `192.168.1.49`) / **gy-002** 的 `squid-cache-0` pod 内, 每个域名连续 20 轮: `getent hosts` 解析 → `curl -sk --proxy http://127.0.0.1:3129 --max-time 6 https://<域名>/`。 +- 每轮记录解析到的首个 IP; 20 轮 IP 序列可反映 DNS 轮询/多 IP。 +- 判定: curl exit 0 = 成功; 28=TIMEOUT / 6=DNSFAIL / 7=CONNFAIL。本轮三集群均无 DNSFAIL/CONNFAIL, 失败全部是超时。 +- 成功率为 **20 轮内成功次数**: **稳定**(20/20) / **间歇**(1-19) / **全失败**(0/20)。 + +## 汇总 + +| 集群 | 稳定(20/20) | 间歇(1-19) | 全失败(0/20) | 实测数 | +|---|---|---|---|---| +| gy-001 (.37) | 86 | 6 | **0** | 92 | +| wlcb-001 (.49) | 89 | 3 | **0** | 92 | +| gy-002 | 88 | 4 | **0** | 92 | + +> **三集群均无完全不可达域名** (修正前旧版 gy-001/wlcb 各有 2~4 个 0/20, 均为 nginx 路径假象)。 + +## 间歇性域名 (任一集群 < 20/20, 共 9 个) + +| 域名 | gy-001 | wlcb-001 | gy-002 | 说明 | +|---|---|---|---|---| +| data.pyg.org | 16/20 | 10/20 | 20/20 | CloudFront 多 IP (`13.225.x.x` 慢 / `18.66.x.x` 快), wlcb 最差 | +| github.com | 19/20 | 20/20 | 18/20 | 固定 `20.205.243.166`, 各集群偶发 1~2 次超时 | +| github-registry-files.githubusercontent.com | 19/20 | 20/20 | 20/20 | 偶发 1 次 | +| github-cloud.githubusercontent.com | 19/20 | 20/20 | 20/20 | 偶发 1 次 | +| release-assets.githubusercontent.com | 19/20 | 20/20 | 17/20 | gy-002 3 次超时 | +| results-receiver.actions.githubusercontent.com | 20/20 | 19/20 | 20/20 | 偶发 1 次 | +| files.pythonhosted.org | 19/20 | 20/20 | 20/20 | gy-001 偶发 1 次 (旧版 gy-001 仅 4~14/20) | +| pypi.org | 20/20 | 20/20 | 19/20 | gy-002 偶发 1 次 | +| 123.60.114.225 | 20/20 | 19/20 | 19/20 | 裸 IP 源站, 偶发超时 (旧版三集群 0/20) | + +## 修正后关键结论 (对比旧版) + +1. **`goproxy.cn` 三集群全部 20/20** (旧版 gy-001 仅 8~11/20)。旧版劣化实为 squid 路径 `connect_timeout 5s` 顺序 failover 与 curl 6s 预算错配 —— 但那是 nginx 路径测不出来的; 真实 squid 路径下 goproxy 完全稳定。 +2. **`mirrors.ustc.edu.cn` / `123.60.114.225` 不再是黑洞**: 修正后 wlcb/gy-002 各有 1 次偶发超时, gy-001 全通。旧版"结构性不可达"结论作废 (nginx 出口无法到达, 与 squid 无关)。 +3. **`github.com` 主域整体健康**: gy-001 19/20、wlcb 20/20、gy-002 18/20, 仅偶发 1~2 次超时。旧版 gy-001 曾 0/20 属 nginx 路径 + 间歇窗口叠加, 不代表 squid 出口阻断。 +4. **`pytorch-package.obs.cn-north-4` 三集群 20/20** (旧版 wlcb 仅 11/20): squid 路径下跨区域 OBS 稳定。 +5. **`data.pyg.org` 是唯一仍有实质抖动** 的域名: wlcb 10/20、gy-001 16/20, 与 squid 无关, 属 CloudFront 部分边缘节点 (wlcb 出口 `13.225.134.125` 慢) 问题。 +6. **结论**: 生产 squid (3129) 出口对 ascend CI 白名单 92 域全部可达, 无结构性阻断; 剩余间歇均为 CDN 多 IP 轮询 + 出口偶发抖动的正常噪声量级。 + +## 全量明细 (92 条, 分类按三集群最差) + +| # | 域名 | gy-001 | wlcb-001 | gy-002 | 分类 | +|---|---|---|---|---|---| +| 1 | devcloud.cn-north-4.huaweicloud.com | 20/20 | 20/20 | 20/20 | 稳定 | +| 2 | devrepo.devcloud.cn-north-4.huaweicloud.com | 20/20 | 20/20 | 20/20 | 稳定 | +| 3 | download.pytorch.org | 20/20 | 20/20 | 20/20 | 稳定 | +| 4 | download-r2.pytorch.org | 20/20 | 20/20 | 20/20 | 稳定 | +| 5 | pytorch-package.obs.cn-north-4.myhuaweicloud.com | 20/20 | 20/20 | 20/20 | 稳定 | +| 6 | pta-pr.obs.cn-north-4.myhuaweicloud.com | 20/20 | 20/20 | 20/20 | 稳定 | +| 7 | mindstudio-pr.obs.cn-north-4.myhuaweicloud.com | 20/20 | 20/20 | 20/20 | 稳定 | +| 8 | www.sqlite.org | 20/20 | 20/20 | 20/20 | 稳定 | +| 9 | sum.golang.google.cn | 20/20 | 20/20 | 20/20 | 稳定 | +| 10 | data.pyg.org | 16/20 | 10/20 | 20/20 | 间歇 | +| 11 | obs.cn-north-1.myhuaweicloud.com | 20/20 | 20/20 | 20/20 | 稳定 | +| 12 | op-svc-swr-b051-10-38-19-62-3az.obs.cn-north-4.myhuaweicloud.com | 20/20 | 20/20 | 20/20 | 稳定 | +| 13 | op-svc-swr-cn-north-4-backup.obs.cn-north-4.myhuaweicloud.com | 20/20 | 20/20 | 20/20 | 稳定 | +| 14 | obs.cn-north-9.myhuaweicloud.com | 20/20 | 20/20 | 20/20 | 稳定 | +| 15 | op-svc-swr-b051-10-147-7-14-3az.obs.cn-east-3.myhuaweicloud.com | 20/20 | 20/20 | 20/20 | 稳定 | +| 16 | op-svc-swr-cn-east-3-backup.obs.cn-east-3.myhuaweicloud.com | 20/20 | 20/20 | 20/20 | 稳定 | +| 17 | op-svc-swr-b051-10-230-33-197-3az.obs.cn-south-1.myhuaweicloud.com | 20/20 | 20/20 | 20/20 | 稳定 | +| 18 | op-svc-swr-cn-south-1-backup.obs.cn-south-1.myhuaweicloud.com | 20/20 | 20/20 | 20/20 | 稳定 | +| 19 | op-svc-swr-b051-10-205-14-19-3az.obs.cn-southwest-2.myhuaweicloud.com | 20/20 | 20/20 | 20/20 | 稳定 | +| 20 | obs.dualstack.cn-east-4.myhuaweicloud.com | 20/20 | 20/20 | 20/20 | 稳定 | +| 21 | lfs-cdn.openeuler.openatom.cn | 20/20 | 20/20 | 20/20 | 稳定 | +| 22 | artlfs.openeuler.openatom.cn | 20/20 | 20/20 | 20/20 | 稳定 | +| 23 | openeuler.openatom.cn | 20/20 | 20/20 | 20/20 | 稳定 | +| 24 | ru-repo.openeuler.org | 20/20 | 20/20 | 20/20 | 稳定 | +| 25 | fr-repo.openeuler.org | 20/20 | 20/20 | 20/20 | 稳定 | +| 26 | www.modelscope.cn | 20/20 | 20/20 | 20/20 | 稳定 | +| 27 | cdn-lfs-cn-1.modelscope.cn | 20/20 | 20/20 | 20/20 | 稳定 | +| 28 | gh-proxy.test.osinfra.cn | 20/20 | 20/20 | 20/20 | 稳定 | +| 29 | apig.openlibing.com | 20/20 | 20/20 | 20/20 | 稳定 | +| 30 | get.helm.sh | 20/20 | 20/20 | 20/20 | 稳定 | +| 31 | openlibing-codeql.obs.cn-southwest-2.myhuaweicloud.com | 20/20 | 20/20 | 20/20 | 稳定 | +| 32 | archive.ubuntu.com | 20/20 | 20/20 | 20/20 | 稳定 | +| 33 | security.ubuntu.com | 20/20 | 20/20 | 20/20 | 稳定 | +| 34 | gitee.com | 20/20 | 20/20 | 20/20 | 稳定 | +| 35 | ports.ubuntu.com | 20/20 | 20/20 | 20/20 | 稳定 | +| 36 | api.github.com | 20/20 | 20/20 | 20/20 | 稳定 | +| 37 | broker.actions.githubusercontent.com | 20/20 | 20/20 | 20/20 | 稳定 | +| 38 | pipelines.actions.githubusercontent.com | 20/20 | 20/20 | 20/20 | 稳定 | +| 39 | pipelinesghubeus4.actions.githubusercontent.com | 20/20 | 20/20 | 20/20 | 稳定 | +| 40 | results-receiver.actions.githubusercontent.com | 20/20 | 19/20 | 20/20 | 间歇 | +| 41 | github.com | 19/20 | 20/20 | 18/20 | 间歇 | +| 42 | codeload.github.com | 20/20 | 20/20 | 20/20 | 稳定 | +| 43 | objects.githubusercontent.com | 20/20 | 20/20 | 20/20 | 稳定 | +| 44 | objects-origin.githubusercontent.com | 20/20 | 20/20 | 20/20 | 稳定 | +| 45 | github-releases.githubusercontent.com | 20/20 | 20/20 | 20/20 | 稳定 | +| 46 | github-registry-files.githubusercontent.com | 19/20 | 20/20 | 20/20 | 间歇 | +| 47 | pkg-containers.githubusercontent.com | 20/20 | 20/20 | 20/20 | 稳定 | +| 48 | ghcr.io | 20/20 | 20/20 | 20/20 | 稳定 | +| 49 | github-cloud.githubusercontent.com | 19/20 | 20/20 | 20/20 | 间歇 | +| 50 | github-cloud.s3.amazonaws.com | 20/20 | 20/20 | 20/20 | 稳定 | +| 51 | dependabot-actions.githubapp.com | 20/20 | 20/20 | 20/20 | 稳定 | +| 52 | release-assets.githubusercontent.com | 19/20 | 20/20 | 17/20 | 间歇 | +| 53 | api.snapcraft.io | 20/20 | 20/20 | 20/20 | 稳定 | +| 54 | pipelinesghubeus1.actions.githubusercontent.com | 20/20 | 20/20 | 20/20 | 稳定 | +| 55 | pipelinesghubeus2.actions.githubusercontent.com | 20/20 | 20/20 | 20/20 | 稳定 | +| 56 | pipelinesghubeus3.actions.githubusercontent.com | 20/20 | 20/20 | 20/20 | 稳定 | +| 57 | pipelinesghubeus5.actions.githubusercontent.com | 20/20 | 20/20 | 20/20 | 稳定 | +| 58 | pipelinesghubeus6.actions.githubusercontent.com | 20/20 | 20/20 | 20/20 | 稳定 | +| 59 | pipelinesghubeus7.actions.githubusercontent.com | 20/20 | 20/20 | 20/20 | 稳定 | +| 60 | pipelinesghubeus8.actions.githubusercontent.com | 20/20 | 20/20 | 20/20 | 稳定 | +| 61 | pipelinesghubeus9.actions.githubusercontent.com | 20/20 | 20/20 | 20/20 | 稳定 | +| 62 | pipelinesghubeus10.actions.githubusercontent.com | 20/20 | 20/20 | 20/20 | 稳定 | +| 63 | pipelinesghubeus11.actions.githubusercontent.com | 20/20 | 20/20 | 20/20 | 稳定 | +| 64 | pipelinesghubeus12.actions.githubusercontent.com | 20/20 | 20/20 | 20/20 | 稳定 | +| 65 | download.openmmlab.com | 20/20 | 20/20 | 20/20 | 稳定 | +| 66 | rsproxy.cn | 20/20 | 20/20 | 20/20 | 稳定 | +| 67 | goproxy.cn | 20/20 | 20/20 | 20/20 | 稳定 | +| 68 | repo.anaconda.com | 20/20 | 20/20 | 20/20 | 稳定 | +| 69 | repo.mindspore.cn | 20/20 | 20/20 | 20/20 | 稳定 | +| 70 | repo.oepkgs.net | 20/20 | 20/20 | 20/20 | 稳定 | +| 71 | repo.openeuler.org | 20/20 | 20/20 | 20/20 | 稳定 | +| 72 | mirrors.ustc.edu.cn | 20/20 | 20/20 | 20/20 | 稳定 | +| 73 | lfs-cdn.gitcode.com | 20/20 | 20/20 | 20/20 | 稳定 | +| 74 | cn-north-4-octopus-gitcode-runner.obs.cn-north-4.myhuaweicloud.com | 20/20 | 20/20 | 20/20 | 稳定 | +| 75 | gitcode.com | 20/20 | 20/20 | 20/20 | 稳定 | +| 76 | atomgit.com | 20/20 | 20/20 | 20/20 | 稳定 | +| 77 | mirrors.huaweicloud.com | 20/20 | 20/20 | 20/20 | 稳定 | +| 78 | mindcluster.obs.cn-north-4.myhuaweicloud.com | 20/20 | 20/20 | 20/20 | 稳定 | +| 79 | mirrors.aliyun.com | 20/20 | 20/20 | 20/20 | 稳定 | +| 80 | mirrors.tuna.tsinghua.edu.cn | 20/20 | 20/20 | 20/20 | 稳定 | +| 81 | repo.huaweicloud.com | 20/20 | 20/20 | 20/20 | 稳定 | +| 82 | mindstudio-pkg.obs.cn-north-4.myhuaweicloud.com | 20/20 | 20/20 | 20/20 | 稳定 | +| 83 | files.pythonhosted.org | 19/20 | 20/20 | 20/20 | 间歇 | +| 84 | mindx-package.obs.cn-north-4.myhuaweicloud.com | 20/20 | 20/20 | 20/20 | 稳定 | +| 85 | pypi.tuna.tsinghua.edu.cn | 20/20 | 20/20 | 20/20 | 稳定 | +| 86 | mindie-pr.obs.cn-north-4.myhuaweicloud.com | 20/20 | 20/20 | 20/20 | 稳定 | +| 87 | pypi.org | 20/20 | 20/20 | 19/20 | 间歇 | +| 88 | build-env.obs.cn-north-4.myhuaweicloud.com | 20/20 | 20/20 | 20/20 | 稳定 | +| 89 | ppa.launchpad.net | 20/20 | 20/20 | 20/20 | 稳定 | +| 90 | obs-community.obs.cn-north-1.myhuaweicloud.com | 20/20 | 20/20 | 20/20 | 稳定 | +| 91 | ascend-cann-open.obs.cn-north-4.myhuaweicloud.com | 20/20 | 20/20 | 20/20 | 稳定 | +| 92 | 123.60.114.225 | 20/20 | 19/20 | 19/20 | 间歇 | diff --git a/domaintest/REPORT.md b/domaintest/REPORT.md new file mode 100644 index 0000000..51a3d2c --- /dev/null +++ b/domaintest/REPORT.md @@ -0,0 +1,140 @@ +# 域名可达性对比报告 (wlcb vs gy-001) + +> 第 2 轮测试时间: 2026-09-02 14:23:04 | 数据源: [ascend_ci_domains.json](ascend_ci_domains.json) (gitcode.com/zhangdiago/ci-infra @ z00833806/WhiteList) + +## 测试方法 + +- 分别在 **wlcb**(squid `192.168.1.49`) 与 **gy-001**(squid `172.16.0.37`) 集群的 squid pod 内, 经本地代理 `127.0.0.1:3128` 对每个域名执行 `curl -sk --proxy http://127.0.0.1:3128 --max-time 6 https://<域名>/`。 +- 走 squid 代理 = 与 CI build 容器**完全相同的出网路径**; `-k` 忽略证书(只看连通性); 判定: `0=可达(显示HTTP码)` / `28=TIMEOUT` / `6=DNSFAIL` / `7=CONNFAIL`。 +- IP 为 **wlcb 集群 DNS** 解析结果(`getent hosts`); 通配符条目(`*.`)无法直接测, 单列。 +- 上游连通为**瞬时快照**且**双向波动**(见"两轮对比"), 结论以多轮为准。 + +## 汇总 (第 2 轮) + +| 集群 | 可达 | TIMEOUT | DNS失败 | 连接拒绝 | 实测数 | +|---|---|---|---|---|---| +| wlcb (.49) | 86 | 2 | 0 | 0 | 88 | +| gy-001 (.37) | 83 | 5 | 0 | 0 | 88 | + +## 两轮对比 (变化项) + +| 域名 | 第1轮 wlcb/gy001 | 第2轮 wlcb/gy001 | 说明 | +|---|---|---|---| +| pytorch-package.obs.cn-north-4.myhuaweicloud.com | TIMEOUT / 200 | 200 / 200 | **wlcb 恢复** ✅ 今天 op-plugin 故障的 OBS 源, wlcb 现已可达 | +| files.pythonhosted.org | TIMEOUT / 200 | 200 / TIMEOUT | 反向波动: wlcb 恢复, gy001 转超时 | +| github-releases.githubusercontent.com | 403 / TIMEOUT | 403 / 403 | gy001 恢复(上轮超时) | + +## 两集群差异 (第 2 轮) + +| 域名 | wlcb(.49) | gy-001(.37) | +|---|---|---| +| github-cloud.githubusercontent.com | 403 | TIMEOUT | +| goproxy.cn | 200 | TIMEOUT | +| files.pythonhosted.org | 200 | TIMEOUT | + +## 根因分析 (DNS/路由层面) + +| 域名 | 现象 | 根因 | +|---|---|---| +| `pytorch-package.obs.cn-north-4.myhuaweicloud.com` | 第1轮 wlcb TIMEOUT / 第2轮恢复 | **wlcb DNS 曾解析出华为私网 IP `100.125.x.x`**(公网不可路由)导致挂起; gy-001 仅返回公网 `121.36.121.x`。已恢复但**随时可能再波动**。 | +| `mirrors.ustc.edu.cn` | 两轮、两集群都 TIMEOUT | 两集群 DNS 均只解析到 **IPv6** `2001:da8:d800:95::110`, 集群无 IPv6 出口 → **结构性不可达**。 | +| `goproxy.cn` | 两轮 gy001 都 TIMEOUT | 解析正常(腾讯云公网 IP), gy-001 egress 到该网段被路由/防火墙阻断 → **结构性阻断**。 | +| `123.60.114.225` | 两轮、两集群都 TIMEOUT | 白名单裸 IP, 443 未开放或不可达 → **结构性不可达**。 | +| `files.pythonhosted.org` / `github-cloud...` / `github-releases...` | 两集群**轮流**超时 | 解析正常, 属各集群 egress 的**间歇性波动**(Fastly/微软/华为云 CDN 链路不稳)。 | + +## 全量明细 (第 2 轮, 92 条) + +| # | 域名 | IP (wlcb DNS) | wlcb(.49) | gy-001(.37) | 备注 | +|---|---|---|---|---|---| +| 1 | devcloud.cn-north-4.huaweicloud.com | 116.205.76.80 | 200 | 200 | | +| 2 | devrepo.devcloud.cn-north-4.huaweicloud.com | 114.116.231.65 | 404 | 404 | | +| 3 | download.pytorch.org | 65.8.76.30,65.8.76.80,13.33.151.127,65.8.76.66,99.84.152.27 | 403 | 403 | | +| 4 | download-r2.pytorch.org | 2606:4700::6812:934,2606:4700::6812:834 | 404 | 404 | | +| 5 | pytorch-package.obs.cn-north-4.myhuaweicloud.com | 100.125.83.133,100.125.76.5,100.125.83.5,121.36.121.227,121.36.121.226 | 200 | 200 | | +| 6 | pta-pr.obs.cn-north-4.myhuaweicloud.com | 122.9.24.7,122.9.24.4 | 403 | 403 | | +| 7 | mindstudio-pr.obs.cn-north-4.myhuaweicloud.com | 122.9.24.7,122.9.24.4 | 200 | 200 | | +| 8 | www.sqlite.org | 2600:3c02::f03c:95ff:fe07:695 | 200 | 200 | | +| 9 | sum.golang.google.cn | 114.250.65.43,114.250.67.43,120.253.253.107,114.250.70.43,114.250.64.43 | 200 | 200 | | +| 10 | data.pyg.org | 3.165.39.92,3.165.39.39,3.165.39.106,3.165.39.19,18.66.112.104 | 200 | 200 | | +| 11 | obs.cn-north-1.myhuaweicloud.com | 114.115.192.98,114.115.192.27,114.115.192.163 | 403 | 403 | | +| 12 | op-svc-swr-b051-10-38-19-62-3az.obs.cn-north-4.myhuaweicloud.com | 121.36.121.197 | 403 | 403 | | +| 13 | op-svc-swr-cn-north-4-backup.obs.cn-north-4.myhuaweicloud.com | 123.60.240.4 | 403 | 403 | | +| 14 | obs.cn-north-9.myhuaweicloud.com | 100.125.32.30,100.125.32.62 | 403 | 403 | | +| 15 | op-svc-swr-b051-10-147-7-14-3az.obs.cn-east-3.myhuaweicloud.com | 153.99.246.122,120.72.57.218,140.206.236.180,36.156.217.76,36.150.19.220 | 403 | 403 | | +| 16 | op-svc-swr-cn-east-3-backup.obs.cn-east-3.myhuaweicloud.com | 121.36.235.173 | 403 | 403 | | +| 17 | op-svc-swr-b051-10-230-33-197-3az.obs.cn-south-1.myhuaweicloud.com | 157.255.136.19,121.14.196.132,116.162.187.35,36.158.239.37,116.162.11.130 | 403 | 403 | | +| 18 | op-svc-swr-cn-south-1-backup.obs.cn-south-1.myhuaweicloud.com | 122.9.127.212,122.9.127.211 | 403 | 403 | | +| 19 | op-svc-swr-b051-10-205-14-19-3az.obs.cn-southwest-2.myhuaweicloud.com | 139.9.224.18 | 403 | 403 | | +| 20 | obs.dualstack.cn-east-4.myhuaweicloud.com | 2409:2001:100:2::6 | 403 | 403 | | +| 21 | lfs-cdn.openeuler.openatom.cn | 61.135.210.39,61.135.210.33,61.135.210.30,61.135.210.35,61.135.210.37 | 403 | 403 | | +| 22 | artlfs.openeuler.openatom.cn | 121.36.2.159 | 200 | 200 | | +| 23 | openeuler.openatom.cn | 49.0.231.109 | 302 | 302 | | +| 24 | ru-repo.openeuler.org | 159.138.205.237 | 200 | 200 | | +| 25 | fr-repo.openeuler.org | 49.0.229.174 | 301 | 301 | | +| 26 | www.modelscope.cn | 47.92.141.220,39.99.133.195 | 302 | 302 | | +| 27 | cdn-lfs-cn-1.modelscope.cn | 221.204.22.21,119.249.48.42,221.204.22.24,221.204.22.23,119.249.48.40 | 403 | 403 | | +| 28 | gh-proxy.test.osinfra.cn | 202.170.93.254 | 200 | 200 | | +| 29 | apig.openlibing.com | 139.9.154.34 | 404 | 404 | | +| 30 | get.helm.sh | 150.171.110.133 | 404 | 404 | | +| 31 | openlibing-codeql.obs.cn-southwest-2.myhuaweicloud.com | 122.9.172.2,122.9.172.3 | 403 | 403 | | +| 32 | archive.ubuntu.com | 91.189.92.24,91.189.91.82,91.189.92.22,185.125.190.81,91.189.91.81 | 200 | 200 | | +| 33 | security.ubuntu.com | 91.189.91.83,91.189.91.82,185.125.190.82,91.189.92.23,91.189.91.81 | 301 | 301 | | +| 34 | gitee.com | 180.76.199.13 | 200 | 200 | | +| 35 | ports.ubuntu.com | 91.189.92.20,91.189.91.103,91.189.91.104,91.189.92.19,91.189.91.102 | 200 | 200 | | +| 36 | api.github.com | 20.205.243.168 | 200 | 200 | | +| 37 | broker.actions.githubusercontent.com | 20.85.130.105 | 404 | 404 | | +| 38 | pipelines.actions.githubusercontent.com | 2620:1ec:21::16 | 404 | 404 | | +| 39 | *.blob.core.windows.net | 通配符 | — | — | 白名单通配条目(*.) | +| 40 | pipelinesghubeus4.actions.githubusercontent.com | 20.232.252.48 | 404 | 404 | | +| 41 | results-receiver.actions.githubusercontent.com | 140.82.112.22,140.82.112.21,140.82.113.21,140.82.113.22,140.82.114.22 | 404 | 404 | | +| 42 | github.com | 20.205.243.166 | 200 | 200 | | +| 43 | *.actions.githubusercontent.com | 通配符 | — | — | 白名单通配条目(*.) | +| 44 | codeload.github.com | 20.205.243.165 | 301 | 301 | | +| 45 | objects.githubusercontent.com | 185.199.109.133,185.199.108.133,185.199.110.133,185.199.111.133 | 404 | 404 | | +| 46 | objects-origin.githubusercontent.com | 140.82.114.22,140.82.112.21,140.82.112.22,140.82.113.21,140.82.113.22 | 405 | 405 | | +| 47 | github-releases.githubusercontent.com | 2606:50c0:8003::154,2606:50c0:8000::154,2606:50c0:8001::154,2606:50c0:8002::154 | 403 | 403 | | +| 48 | github-registry-files.githubusercontent.com | 185.199.108.154,185.199.109.154,185.199.111.154,185.199.110.154 | 403 | 403 | | +| 49 | *.pkg.github.com | 通配符 | — | — | 白名单通配条目(*.) | +| 50 | pkg-containers.githubusercontent.com | 2606:50c0:8003::154,2606:50c0:8000::154,2606:50c0:8001::154,2606:50c0:8002::154 | 400 | 400 | | +| 51 | ghcr.io | 20.205.243.164 | 301 | 301 | | +| 52 | github-cloud.githubusercontent.com | 185.199.108.154,185.199.109.154,185.199.110.154,185.199.111.154 | 403 | TIMEOUT | | +| 53 | github-cloud.s3.amazonaws.com | 16.182.105.33,52.217.117.217,54.231.193.113,52.217.73.204,16.15.252.6 | 403 | 403 | | +| 54 | dependabot-actions.githubapp.com | 140.82.113.21,140.82.112.21,140.82.112.22,140.82.114.21,140.82.114.22 | 404 | 404 | | +| 55 | release-assets.githubusercontent.com | 185.199.109.133,185.199.110.133,185.199.108.133,185.199.111.133 | 404 | 404 | | +| 56 | api.snapcraft.io | 185.125.188.60,185.125.188.54,185.125.188.57,185.125.188.55,185.125.188.58 | 200 | 200 | | +| 57 | *.core.windows.net | 通配符 | — | — | 白名单通配条目(*.) | +| 58 | pipelinesghubeus1.actions.githubusercontent.com | 20.242.179.206 | 404 | 404 | | +| 59 | pipelinesghubeus2.actions.githubusercontent.com | 20.242.161.191 | 404 | 404 | | +| 60 | pipelinesghubeus3.actions.githubusercontent.com | 20.102.36.236 | 404 | 404 | | +| 61 | pipelinesghubeus5.actions.githubusercontent.com | 20.253.95.3 | 404 | 404 | | +| 62 | pipelinesghubeus6.actions.githubusercontent.com | 20.253.126.26 | 404 | 404 | | +| 63 | pipelinesghubeus7.actions.githubusercontent.com | 20.246.184.240 | 404 | 404 | | +| 64 | pipelinesghubeus8.actions.githubusercontent.com | 20.102.39.220 | 404 | 404 | | +| 65 | pipelinesghubeus9.actions.githubusercontent.com | 40.88.239.133 | 404 | 404 | | +| 66 | pipelinesghubeus10.actions.githubusercontent.com | 20.102.38.122 | 404 | 404 | | +| 67 | pipelinesghubeus11.actions.githubusercontent.com | 20.237.33.78 | 404 | 404 | | +| 68 | pipelinesghubeus12.actions.githubusercontent.com | 20.102.39.57 | 404 | 404 | | +| 69 | download.openmmlab.com | 124.95.157.82,36.163.116.58,124.95.157.86,124.95.157.84,124.95.157.83 | 403 | 403 | | +| 70 | rsproxy.cn | 101.126.58.175,101.126.58.176,122.14.229.103,101.126.58.177,110.249.198.6 | 200 | 200 | | +| 71 | goproxy.cn | 211.154.247.40,36.156.9.206,36.110.220.112,36.156.9.207,36.110.220.110,36.110.220.113,36.110.220.114,36.110.220.111,211.154.244.168 | 200 | TIMEOUT | | +| 72 | repo.anaconda.com | 2606:4700::6810:bf9e,2606:4700::6810:20f1 | 200 | 200 | | +| 73 | mirrors.ustc.edu.cn | 2001:da8:d800:95::110 | TIMEOUT | TIMEOUT | | +| 74 | lfs-cdn.gitcode.com | 121.22.232.157,121.22.232.156,121.22.232.155,121.22.232.153,223.68.255.156 | 403 | 403 | | +| 75 | cn-north-4-octopus-gitcode-runner.obs.cn-north-4.myhuaweicloud.com | 123.60.240.12,123.60.240.13 | 403 | 403 | | +| 76 | gitcode.com | 116.205.2.91 | 200 | 200 | | +| 77 | atomgit.com | 116.205.2.91 | 200 | 200 | | +| 78 | mirrors.huaweicloud.com | 120.46.2.67,1.92.76.132,123.249.118.101,124.70.61.162,120.46.63.139 | 200 | 200 | | +| 79 | mindcluster.obs.cn-north-4.myhuaweicloud.com | 122.9.24.7,122.9.24.4 | 403 | 403 | | +| 80 | mirrors.aliyun.com | 27.221.122.13,218.61.62.112,218.24.82.120,116.196.142.20,218.61.162.30 | 301 | 301 | | +| 81 | mirrors.tuna.tsinghua.edu.cn | 2402:f000:1:400::2 | 200 | 200 | | +| 82 | repo.huaweicloud.com | 61.135.210.34,61.135.210.41,61.135.210.30,61.135.210.44,61.135.210.43 | 301 | 301 | | +| 83 | mindstudio-pkg.obs.cn-north-4.myhuaweicloud.com | 122.9.24.7,122.9.24.4 | 200 | 200 | | +| 84 | files.pythonhosted.org | 151.101.192.223,151.101.128.223,112.121.185.26,151.101.0.223,151.101.64.223 | 200 | TIMEOUT | | +| 85 | mindx-package.obs.cn-north-4.myhuaweicloud.com | 122.9.24.7,122.9.24.4 | 200 | 200 | | +| 86 | pypi.tuna.tsinghua.edu.cn | 2402:f000:1:400::2 | 302 | 302 | | +| 87 | mindie-pr.obs.cn-north-4.myhuaweicloud.com | 123.60.240.83 | 403 | 403 | | +| 88 | pypi.org | 2a04:4e42:400::223,2a04:4e42::223,2a04:4e42:600::223,2a04:4e42:200::223 | 200 | 200 | | +| 89 | build-env.obs.cn-north-4.myhuaweicloud.com | 122.9.24.4,122.9.24.7 | 403 | 403 | | +| 90 | ppa.launchpad.net | 2620:2d:4000:1009::1ed,2620:2d:4000:1009::12c,2620:2d:4000:1009::15f | 302 | 302 | | +| 91 | obs-community.obs.cn-north-1.myhuaweicloud.com | 114.115.192.27,114.115.192.98,114.115.192.163 | 403 | 403 | | +| 92 | 123.60.114.225 | 123.60.114.225 | TIMEOUT | TIMEOUT | | diff --git a/domaintest/ascend_ci_domains.json b/domaintest/ascend_ci_domains.json new file mode 100644 index 0000000..34e249c --- /dev/null +++ b/domaintest/ascend_ci_domains.json @@ -0,0 +1,98 @@ +[ + "devcloud.cn-north-4.huaweicloud.com", + "devrepo.devcloud.cn-north-4.huaweicloud.com", + "download.pytorch.org", + "download-r2.pytorch.org", + "pytorch-package.obs.cn-north-4.myhuaweicloud.com", + "pta-pr.obs.cn-north-4.myhuaweicloud.com", + "mindstudio-pr.obs.cn-north-4.myhuaweicloud.com", + "www.sqlite.org", + "sum.golang.google.cn", + "data.pyg.org", + "obs.cn-north-1.myhuaweicloud.com", + "op-svc-swr-b051-10-38-19-62-3az.obs.cn-north-4.myhuaweicloud.com", + "op-svc-swr-cn-north-4-backup.obs.cn-north-4.myhuaweicloud.com", + "obs.cn-north-9.myhuaweicloud.com", + "op-svc-swr-b051-10-147-7-14-3az.obs.cn-east-3.myhuaweicloud.com", + "op-svc-swr-cn-east-3-backup.obs.cn-east-3.myhuaweicloud.com", + "op-svc-swr-b051-10-230-33-197-3az.obs.cn-south-1.myhuaweicloud.com", + "op-svc-swr-cn-south-1-backup.obs.cn-south-1.myhuaweicloud.com", + "op-svc-swr-b051-10-205-14-19-3az.obs.cn-southwest-2.myhuaweicloud.com", + "obs.dualstack.cn-east-4.myhuaweicloud.com", + "lfs-cdn.openeuler.openatom.cn", + "artlfs.openeuler.openatom.cn", + "openeuler.openatom.cn", + "ru-repo.openeuler.org", + "fr-repo.openeuler.org", + "www.modelscope.cn", + "cdn-lfs-cn-1.modelscope.cn", + "gh-proxy.test.osinfra.cn", + "apig.openlibing.com", + "get.helm.sh", + "openlibing-codeql.obs.cn-southwest-2.myhuaweicloud.com", + "archive.ubuntu.com", + "security.ubuntu.com", + "gitee.com", + "ports.ubuntu.com", + "api.github.com", + "broker.actions.githubusercontent.com", + "pipelines.actions.githubusercontent.com", + "*.blob.core.windows.net", + "pipelinesghubeus4.actions.githubusercontent.com", + "results-receiver.actions.githubusercontent.com", + "github.com", + "*.actions.githubusercontent.com", + "codeload.github.com", + "objects.githubusercontent.com", + "objects-origin.githubusercontent.com", + "github-releases.githubusercontent.com", + "github-registry-files.githubusercontent.com", + "*.pkg.github.com", + "pkg-containers.githubusercontent.com", + "ghcr.io", + "github-cloud.githubusercontent.com", + "github-cloud.s3.amazonaws.com", + "dependabot-actions.githubapp.com", + "release-assets.githubusercontent.com", + "api.snapcraft.io", + "*.core.windows.net", + "pipelinesghubeus1.actions.githubusercontent.com", + "pipelinesghubeus2.actions.githubusercontent.com", + "pipelinesghubeus3.actions.githubusercontent.com", + "pipelinesghubeus5.actions.githubusercontent.com", + "pipelinesghubeus6.actions.githubusercontent.com", + "pipelinesghubeus7.actions.githubusercontent.com", + "pipelinesghubeus8.actions.githubusercontent.com", + "pipelinesghubeus9.actions.githubusercontent.com", + "pipelinesghubeus10.actions.githubusercontent.com", + "pipelinesghubeus11.actions.githubusercontent.com", + "pipelinesghubeus12.actions.githubusercontent.com", + "download.openmmlab.com", + "rsproxy.cn", + "goproxy.cn", + "repo.anaconda.com", + "repo.mindspore.cn", + "repo.oepkgs.net", + "repo.openeuler.org", + "https://mirrors.ustc.edu.cn", + "lfs-cdn.gitcode.com", + "cn-north-4-octopus-gitcode-runner.obs.cn-north-4.myhuaweicloud.com", + "gitcode.com", + "atomgit.com", + "mirrors.huaweicloud.com", + "mindcluster.obs.cn-north-4.myhuaweicloud.com", + "mirrors.aliyun.com", + "mirrors.tuna.tsinghua.edu.cn", + "repo.huaweicloud.com", + "mindstudio-pkg.obs.cn-north-4.myhuaweicloud.com", + "files.pythonhosted.org", + "mindx-package.obs.cn-north-4.myhuaweicloud.com", + "pypi.tuna.tsinghua.edu.cn", + "mindie-pr.obs.cn-north-4.myhuaweicloud.com", + "pypi.org", + "build-env.obs.cn-north-4.myhuaweicloud.com", + "ppa.launchpad.net", + "obs-community.obs.cn-north-1.myhuaweicloud.com", + "ascend-cann-open.obs.cn-north-4.myhuaweicloud.com", + "123.60.114.225" +] \ No newline at end of file diff --git a/domaintest/test-domains-x20.sh b/domaintest/test-domains-x20.sh new file mode 100644 index 0000000..c6dec8a --- /dev/null +++ b/domaintest/test-domains-x20.sh @@ -0,0 +1,52 @@ +#!/usr/bin/env bash +# 对白名单每个域名做 N 轮「DNS 解析 + 经 squid 连通」测试, 采集每轮解析 IP 与连通结果 +# 用法: bash test-domains-x20.sh +# 输出: results-x20-.tsv 每行: 域名|成功数|超时数|DNS失败|连接拒绝|逐轮IP(逗号分隔,N个) +set -u +cd "$(dirname "$0")" + +ROUNDS="${ROUNDS:-20}" +KUBECTL_OPTS="${KUBECTL_OPTS:-}" + +# 从白名单 json 提取实域名(跳过 *. 通配), 拼成空格分隔串(域名无空格/glob 字符, 直接分词安全) +ARGS=$(python3 - <<'PY' +import json +doms = [x.replace("https://","").strip() for x in json.load(open("ascend_ci_domains.json")) if not x.startswith("*")] +print(" ".join(d for d in doms)) +PY +) + +# 在指定集群的 squid pod 内执行 N 轮测试 +run_cluster() { + local kube="$1" pod="$2" out="$3" + echo ">>> [$kube] $pod 开始 ${ROUNDS} 轮 × $(echo "$ARGS" | wc -w) 域名" + kubectl --kubeconfig "$kube" exec -i -n squid "$pod" -c squid -- sh -s -- "$ARGS" "$ROUNDS" <<'REMOTE' > "$out" +set -u +ARGS="$1"; R="$2" +for d in $ARGS; do + ok=0; to=0; dn=0; cn=0; ips="" + i=1 + while [ "$i" -le "$R" ]; do + ip=$(getent hosts "$d" | awk '{print $1}' | head -1) + [ -n "$ip" ] && ips="$ips,$ip" + code=$(curl -sk -o /dev/null --proxy http://127.0.0.1:3129 --max-time 6 -w "%{http_code}" "https://$d/" 2>/dev/null) + ec=$? + if [ "$ec" -eq 0 ]; then ok=$((ok+1)); else + case "$ec" in + 28) to=$((to+1));; 6) dn=$((dn+1));; 7) cn=$((cn+1));; *) to=$((to+1));; + esac + fi + i=$((i+1)) + done + ips=${ips#,} + echo "$d|$ok|$to|$dn|$cn|$ips" +done +REMOTE + echo ">>> [$kube] 完成: $out" +} + +# 两个集群并行 +run_cluster "$HOME/.kube/wlcb-001.yaml" squid-cache-0 results-x20-wlcb.tsv & +run_cluster "$HOME/.kube/gy-001.yaml" squid-cache-0 results-x20-gy001.tsv & +wait +echo "全部完成" diff --git a/domaintest/test-domains.sh b/domaintest/test-domains.sh new file mode 100644 index 0000000..7e05935 --- /dev/null +++ b/domaintest/test-domains.sh @@ -0,0 +1,91 @@ +#!/usr/bin/env bash +# 域名可达性对比测试: wlcb(.49) vs gy-001(.37) +# 方法: 在各自集群的 squid pod 内, 经本地 squid 代理(127.0.0.1:3128)逐个测试 +# ascend_ci_domains.json 白名单里的域名 (curl -sk 忽略证书, 只看连通性) +# 输出: domaintest/results-wlcb.tsv / results-gy001.tsv + 终端对比表 +set -u + +DIR="$(cd "$(dirname "$0")" && pwd)" +LIST="$DIR/ascend_ci_domains.json" +OUT_W="$DIR/results-wlcb.tsv" +OUT_G="$DIR/results-gy001.tsv" + +# 生成 pod 内执行的脚本: for d in <字面量域名列表>; do curl ...; done +gen_script() { + local doms + doms=$(python3 - "$LIST" <<'PY' +import json, sys +doms = [x.replace("https://", "").strip() for x in json.load(open(sys.argv[1]))] +# 跳过通配符条目(*.), 其余按单引号包好 +print(" ".join("'%s'" % d for d in doms if not d.startswith("*"))) +PY +) + cat </dev/null) + ec=\$? + echo "\$label|\$d|\$ec|\$r" +done +EOF +} + +# 跑一个集群: 参数 = kubeconfig, pod, ns, 标签, 输出文件 +run_cluster() { + local kc="$1" pod="$2" ns="$3" label="$4" out="$5" + echo "[$label] 测试中 ($(python3 -c "import json,sys;print(len([x for x in json.load(open('$LIST')) if not x.startswith('*')]))") 个域名, 经 $pod ..." + gen_script | kubectl --kubeconfig "$kc" exec -i -n "$ns" "$pod" -- sh -s -- "$label" > "$out" 2>/dev/null + echo "[$label] 完成 -> $(wc -l < "$out") 条" +} + +# 归类: 0=可达(code) / 28=超时 / 6=DNS / 7=连接拒绝 / 其他=ERR +classify() { + local ec="$1" code="$2" + if [ "$ec" = "0" ]; then echo "$code"; + elif [ "$ec" = "28" ]; then echo "TIMEOUT"; + elif [ "$ec" = "6" ]; then echo "DNSFAIL"; + elif [ "$ec" = "7" ]; then echo "CONNFAIL"; + else echo "ERR$ec"; fi +} + +run_cluster ~/.kube/wlcb-001.yaml squid-cache-0 squid wlcb "$OUT_W" +run_cluster ~/.kube/gy-001.yaml squid-cache-0 squid gy001 "$OUT_G" + +# 对比表 +python3 - "$OUT_W" "$OUT_G" <<'PY' +import sys +def load(p): + m = {} + for line in open(p): + parts = line.rstrip("\n").split("|") + if len(parts) < 4: continue + lab, dom, ec, rest = parts[0], parts[1], parts[2], parts[3] + code, tm = (rest.split("|") + ["", ""])[:2] + m[dom] = (lab, ec, code, tm) + return m + +w = load(sys.argv[1]); g = load(sys.argv[2]) +def cls(m, d): + if d not in m: return "N/A" + lab, ec, code, tm = m[d] + if ec == "0": return code + return {"28":"TIMEOUT","6":"DNSFAIL","7":"CONNFAIL"}.get(ec, "ERR"+ec) + +doms = sorted(set(w) | set(g)) +print(f"{'DOMAIN':<55} {'wlcb(.49)':<10} {'gy001(.37)':<10}") +print("-"*78) +for d in doms: + print(f"{d:<55} {cls(w,d):<10} {cls(g,d):<10}") +# 汇总 +def summary(m): + ok = sum(1 for d in m if m[d][1] == "0") + to = sum(1 for d in m if m[d][1] == "28") + dns = sum(1 for d in m if m[d][1] == "6") + cn = sum(1 for d in m if m[d][1] == "7") + return ok, to, dns, cn +wo, wt, wd, wc = summary(w) +go, gt, gd, gc = summary(g) +print("-"*78) +print(f"wlcb : 可达{wo} 超时{wt} DNS失败{wd} 连接拒绝{wc}") +print(f"gy001: 可达{go} 超时{gt} DNS失败{gd} 连接拒绝{gc}") +PY diff --git a/domaintest/test-proxy-vs-direct-x20.sh b/domaintest/test-proxy-vs-direct-x20.sh new file mode 100644 index 0000000..33d1cd4 --- /dev/null +++ b/domaintest/test-proxy-vs-direct-x20.sh @@ -0,0 +1,61 @@ +#!/usr/bin/env bash +# 域名连通性 Proxy vs 直连 对比测试 (修正版: proxy 走 squid 3129, 非 nginx 3128) +# 方法: 在各自集群的 squid pod 内 (同一 pod/节点/出口 NAT), +# 对每个白名单实域名做 R 轮「经 squid 代理 (127.0.0.1:3129)」+ R 轮「直连」, +# curl -sk --max-time 6, 只看连通性。 +# 用法: bash test-proxy-vs-direct-x20.sh +# 输出: results-pvd-.tsv 每行: 域名|proxy成功|proxy超时|proxyDNS|proxy连拒|直连成功|直连超时|直连DNS|直连连拒 +set -u +cd "$(dirname "$0")" + +ROUNDS="${ROUNDS:-20}" +KUBECTL_OPTS="${KUBECTL_OPTS:-}" + +# 从白名单 json 提取实域名(跳过 *. 通配), 拼成空格分隔串 +ARGS=$(python3 - <<'PY' +import json +doms = [x.replace("https://","").strip() for x in json.load(open("ascend_ci_domains.json")) if not x.startswith("*")] +print(" ".join(d for d in doms)) +PY +) + +# 远程循环体: proxy(3129) 与 直连 各 R 轮, 结果写一行 +REMOTE='set -u +ARGS="$1"; R="$2" +for d in $ARGS; do + pok=0; pto=0; pdn=0; pcn=0 + dok=0; dto=0; ddn=0; dcn=0 + i=1 + while [ "$i" -le "$R" ]; do + curl -sk -o /dev/null --proxy http://127.0.0.1:3129 --max-time 6 "https://$d/" 2>/dev/null + ec=$? + if [ "$ec" -eq 0 ]; then pok=$((pok+1)); else + case "$ec" in + 28) pto=$((pto+1));; 6) pdn=$((pdn+1));; 7) pcn=$((pcn+1));; *) pto=$((pto+1));; + esac + fi + curl -sk -o /dev/null --max-time 6 "https://$d/" 2>/dev/null + ec=$? + if [ "$ec" -eq 0 ]; then dok=$((dok+1)); else + case "$ec" in + 28) dto=$((dto+1));; 6) ddn=$((ddn+1));; 7) dcn=$((dcn+1));; *) dto=$((dto+1));; + esac + fi + i=$((i+1)) + done + echo "$d|$pok|$pto|$pdn|$pcn|$dok|$dto|$ddn|$dcn" +done' + +run_cluster() { + local kube="$1" out="$2" + echo ">>> [$kube] squid-cache-0 开始 ${ROUNDS} 轮 proxy + ${ROUNDS} 轮 直连 × $(echo "$ARGS" | wc -w) 域名" + kubectl --kubeconfig "$kube" exec -i -n squid squid-cache-0 -c squid -- sh -s -- "$ARGS" "$ROUNDS" <<< "$REMOTE" > "$out" + echo ">>> [$kube] 完成: $(wc -l < "$out") 条 -> $out" +} + +# 三集群并行 +run_cluster "$HOME/.kube/gy-001.yaml" results-pvd-gy001.tsv & +run_cluster "$HOME/.kube/wlcb-001.yaml" results-pvd-wlcb.tsv & +run_cluster "$HOME/.kube/gy-002.yaml" results-pvd-gy002.tsv & +wait +echo "全部完成" diff --git a/domaintest/x20-remote.sh b/domaintest/x20-remote.sh new file mode 100644 index 0000000..6bbc6a3 --- /dev/null +++ b/domaintest/x20-remote.sh @@ -0,0 +1,25 @@ +# 远程循环体: 在 squid pod 内运行 (由 kubectl exec sh -s -- ARGS ROUNDS < 本文件 调用) +# ARGS=$1: 空格分隔域名; R=$2: 轮数 +# 端口说明: pod 内 squid 监听 3129 (http_port 3129 ssl-bump); +# 127.0.0.1:3128 是同 pod 的 registry-proxy nginx (cache_peer 上游), 测 squid 必须用 3129。 +# CI 客户端经 Service squid-cache:3128 会被 targetPort 转到 3129, 等价于本测试路径。 +set -u +ARGS="$1"; R="$2" +for d in $ARGS; do + ok=0; to=0; dn=0; cn=0; ips="" + i=1 + while [ "$i" -le "$R" ]; do + ip=$(getent hosts "$d" | awk '{print $1}' | head -1) + [ -n "$ip" ] && ips="$ips,$ip" + code=$(curl -sk -o /dev/null --proxy http://127.0.0.1:3129 --max-time 6 -w "%{http_code}" "https://$d/" 2>/dev/null) + ec=$? + if [ "$ec" -eq 0 ]; then ok=$((ok+1)); else + case "$ec" in + 28) to=$((to+1));; 6) dn=$((dn+1));; 7) cn=$((cn+1));; *) to=$((to+1));; + esac + fi + i=$((i+1)) + done + ips=${ips#,} + echo "$d|$ok|$to|$dn|$cn|$ips" +done