From 86c1b7384995b696d173a5fa9d55f084eb051ad0 Mon Sep 17 00:00:00 2001 From: Chenlong Ma Date: Fri, 24 Nov 2023 17:25:32 +0800 Subject: [PATCH] fix docker compose healthcheck Signed-off-by: Chenlong Ma --- build/ci/docker-deploy/docker_deploy.sh | 4 ++-- docker-deploy/training_template/docker-compose-eggroll.yml | 2 +- docker-deploy/training_template/docker-compose-spark-slim.yml | 2 +- docker-deploy/training_template/docker-compose-spark.yml | 2 +- 4 files changed, 5 insertions(+), 5 deletions(-) diff --git a/build/ci/docker-deploy/docker_deploy.sh b/build/ci/docker-deploy/docker_deploy.sh index 681503639..3f55763fb 100644 --- a/build/ci/docker-deploy/docker_deploy.sh +++ b/build/ci/docker-deploy/docker_deploy.sh @@ -47,8 +47,8 @@ for ((i = 1; i <= MAX_TRY; i++)); do result=$(docker ps | wc -l) if [ "${result}" -eq ${CONTAINER_NUM} ]; then echo "# containers are ok" - FATE_FLOW_STATUS=$(curl -s -X POST localhost:9380/v1/version/get) - success='"retmsg":"success"' + FATE_FLOW_STATUS=$(curl -s -X GET localhost:9380/v2/server/fateflow) + success='"message":"success"' result=$(echo $FATE_FLOW_STATUS | grep "${success}") if [[ "$result" != "" ]] then diff --git a/docker-deploy/training_template/docker-compose-eggroll.yml b/docker-deploy/training_template/docker-compose-eggroll.yml index 276866b95..8bdbf18da 100644 --- a/docker-deploy/training_template/docker-compose-eggroll.yml +++ b/docker-deploy/training_template/docker-compose-eggroll.yml @@ -134,7 +134,7 @@ services: fate-network: ipv4_address: 192.167.0.100 healthcheck: - test: ["CMD", "curl", "-f", "-X POST", "http://192.167.0.100:9380/v1/version/get"] + test: ["CMD", "curl", "-f", "-X GET", "http://192.167.0.100:9380/v2/server/fateflow"] interval: 1m30s timeout: 10s retries: 3 diff --git a/docker-deploy/training_template/docker-compose-spark-slim.yml b/docker-deploy/training_template/docker-compose-spark-slim.yml index ab368aa83..3dbbf12bc 100644 --- a/docker-deploy/training_template/docker-compose-spark-slim.yml +++ b/docker-deploy/training_template/docker-compose-spark-slim.yml @@ -77,7 +77,7 @@ services: fate-network: ipv4_address: 192.167.0.100 healthcheck: - test: ["CMD", "curl", "-f", "-X POST", "http://192.167.0.100:9380/v1/version/get"] + test: ["CMD", "curl", "-f", "-X GET", "http://192.167.0.100:9380/v2/server/fateflow"] interval: 1m30s timeout: 10s retries: 3 diff --git a/docker-deploy/training_template/docker-compose-spark.yml b/docker-deploy/training_template/docker-compose-spark.yml index 7ddc49128..3bc5b3053 100644 --- a/docker-deploy/training_template/docker-compose-spark.yml +++ b/docker-deploy/training_template/docker-compose-spark.yml @@ -77,7 +77,7 @@ services: fate-network: ipv4_address: 192.167.0.100 healthcheck: - test: ["CMD", "curl", "-f", "-X POST", "http://192.167.0.100:9380/v1/version/get"] + test: ["CMD", "curl", "-f", "-X GET", "http://192.167.0.100:9380/v2/server/fateflow"] interval: 1m30s timeout: 10s retries: 3