diff --git a/scripts/cluster/verify-cluster.sh b/scripts/cluster/verify-cluster.sh index ef327da..3f75306 100755 --- a/scripts/cluster/verify-cluster.sh +++ b/scripts/cluster/verify-cluster.sh @@ -115,14 +115,18 @@ REMOTE echo 'application_acceptance=PASS api=2 web=2 digests=pinned' for edge_ip in "${CLUSTER_NINGBO_HOST#*@}" "${CLUSTER_HONGKONG_HOST#*@}"; do - curl -fsS --max-time 10 --resolve "ai.51easyai.com:443:$edge_ip" \ - https://ai.51easyai.com/api/v1/healthz | grep -q easyai-ai-gateway - curl -fsS --max-time 10 --resolve "ai.51easyai.com:443:$edge_ip" \ - https://ai.51easyai.com/api/v1/readyz | grep -q '"ok":true' - curl -fsS --max-time 10 --resolve "ai.51easyai.com:443:$edge_ip" \ - https://ai.51easyai.com/api/v1/openapi.json | grep -q '"/api/v1/chat/completions"' - curl -fsS --max-time 10 --resolve "ai.51easyai.com:443:$edge_ip" \ - https://ai.51easyai.com/ | grep -q 'EasyAI AI Gateway' + health_body=$(curl -fsS --max-time 10 --resolve "ai.51easyai.com:443:$edge_ip" \ + https://ai.51easyai.com/api/v1/healthz) + grep -q easyai-ai-gateway <<<"$health_body" + ready_body=$(curl -fsS --max-time 10 --resolve "ai.51easyai.com:443:$edge_ip" \ + https://ai.51easyai.com/api/v1/readyz) + grep -q '"ok":true' <<<"$ready_body" + openapi_body=$(curl -fsS --max-time 10 --resolve "ai.51easyai.com:443:$edge_ip" \ + https://ai.51easyai.com/api/v1/openapi.json) + grep -q '"/api/v1/chat/completions"' <<<"$openapi_body" + web_body=$(curl -fsS --max-time 10 --resolve "ai.51easyai.com:443:$edge_ip" \ + https://ai.51easyai.com/) + grep -q 'EasyAI AI Gateway' <<<"$web_body" done echo 'nginx_edges=PASS ningbo=true hongkong=true dns_changed=false' fi