Merge "[TRAIN-Only] Add healthcheck debug flag" into stable/train

This commit is contained in:
Zuul 2020-09-09 04:40:02 +00:00 committed by Gerrit Code Review
commit 779f21cfac
2 changed files with 14 additions and 1 deletions

View File

@ -1,5 +1,12 @@
#!/bin/bash
set -euxo pipefail
set -euo pipefail
: ${HEALTHCHECK_DEBUG:=0}
if [ $HEALTHCHECK_DEBUG -ne 0 ]; then
set -x
exec 3>&1
else
exec 3>/dev/null
fi
: ${HEALTHCHECK_CURL_MAX_TIME:=10}
: ${HEALTHCHECK_CURL_USER_AGENT:=curl-healthcheck}
: ${HEALTHCHECK_CURL_WRITE_OUT:='\n%{http_code} %{remote_ip}:%{remote_port} %{time_total} seconds\n'}

View File

@ -0,0 +1,6 @@
---
features:
- |
Introduce new HEALTHCHECK_DEBUG variable in order to toggle verbosity,
defaults to 0 (no verbosity). Setting it to 1 will activate -x flag,
among other things.