Skip to content

Commit

Permalink
Merge pull request #294 from madgik/bug/health_check_timeout
Browse files Browse the repository at this point in the history
Max timeout added on CURL for health check.
  • Loading branch information
ThanKarab authored Nov 16, 2020
2 parents f3edf2b + d9a5f13 commit 6ac4212
Showing 1 changed file with 3 additions and 2 deletions.
5 changes: 3 additions & 2 deletions Exareme-Docker/files/root/exareme/bootstrap.sh
Original file line number Diff line number Diff line change
Expand Up @@ -12,6 +12,7 @@ export CONSUL_ACTIVE_WORKERS_PATH="active_workers"
CONSUL_CONNECTION_MAX_ATTEMPTS=20
CONSUL_WAIT_FOR_MASTER_IP_MAX_ATTEMPTS=20
EXAREME_NODE_STARTUP_HEALTH_CHECK_MAX_ATTEMPTS=10
EXAREME_NODE_HEALTH_CHECK_TIMEOUT=30
PERIODIC_EXAREME_NODES_HEALTH_CHECK_MAX_RETRIES=10
PERIODIC_EXAREME_NODES_HEALTH_CHECK_INTERVAL=120
PERIODIC_TEMP_FILES_REMOVAL=300
Expand Down Expand Up @@ -115,9 +116,9 @@ exaremeNodesHealthCheck() {
echo "$(timestamp) HEALTH CHECK for node with IP ${NODE_IP} and name ${NODE_NAME} ."

if [[ "${FEDERATION_ROLE}" == "master" ]]; then
check=$(curl -s -X POST ${NODE_IP}:9090/mining/query/HEALTH_CHECK)
check=$(curl -s -X POST --max-time ${EXAREME_NODE_HEALTH_CHECK_TIMEOUT} ${NODE_IP}:9090/mining/query/HEALTH_CHECK)
else
check=$(curl -s ${MASTER_IP}:9092/check/worker?NODE_IP=${NODE_IP})
check=$(curl -s --max-time ${EXAREME_NODE_HEALTH_CHECK_TIMEOUT} ${MASTER_IP}:9092/check/worker?NODE_IP=${NODE_IP})
fi

if [[ -z ${check} ]]; then
Expand Down

0 comments on commit 6ac4212

Please sign in to comment.