From a073c840ac188196a41ffbe3b0c43a0806129df4 Mon Sep 17 00:00:00 2001 From: wangbo Date: Wed, 29 Jul 2026 17:05:59 +0800 Subject: [PATCH] =?UTF-8?q?fix(cluster):=20=E5=85=BC=E5=AE=B9=20Worker=20?= =?UTF-8?q?=E7=BC=A9=E5=AE=B9=E5=90=8E=E7=9A=84=E7=A9=BA=E5=B0=B1=E7=BB=AA?= =?UTF-8?q?=E7=8A=B6=E6=80=81?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Kubernetes 在 Deployment 缩容为 0 后可能省略 status.readyReplicas;验收脚本将空值按 0 处理,避免在提交真实任务前误判失败。 --- scripts/cluster/run-cross-node-file-e2e.sh | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/scripts/cluster/run-cross-node-file-e2e.sh b/scripts/cluster/run-cross-node-file-e2e.sh index e66d03f..220932f 100755 --- a/scripts/cluster/run-cross-node-file-e2e.sh +++ b/scripts/cluster/run-cross-node-file-e2e.sh @@ -46,8 +46,9 @@ done [[ ${pod_count:-0} == 1 && ${process_role:-} == worker && ${pod_ready:-} == true ]] [[ $(k3s kubectl get deployment easyai-api-ningbo -n easyai \ -o jsonpath='{.spec.template.spec.containers[0].env[?(@.name=="AI_GATEWAY_PROCESS_ROLE")].value}') == api ]] -[[ $(k3s kubectl get deployment easyai-worker-ningbo -n easyai \ - -o jsonpath='{.status.readyReplicas}') == 0 ]] +ningbo_worker_ready=$(k3s kubectl get deployment easyai-worker-ningbo -n easyai \ + -o jsonpath='{.status.readyReplicas}') +[[ ${ningbo_worker_ready:-0} -eq 0 ]] curl -fsS http://10.77.0.1:31088/api/v1/readyz | grep -q '"ok":true' curl -fsS http://10.77.0.2:31089/api/v1/readyz | grep -q '"ok":true' REMOTE