Browse Source

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

changes/29/750629/1
Zuul 3 weeks ago
committed by Gerrit Code Review
parent
commit
779f21cfac
2 changed files with 14 additions and 1 deletions
  1. +8
    -1
      healthcheck/common.sh
  2. +6
    -0
      releasenotes/notes/healthcheck-debug-0fbcfebd9042720c.yaml

+ 8
- 1
healthcheck/common.sh 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'}


+ 6
- 0
releasenotes/notes/healthcheck-debug-0fbcfebd9042720c.yaml 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.

Loading…
Cancel
Save