Skip to content
Snippets Groups Projects

Add code 502 to trigger restart

Open Francisco Borges Aurindo Barros requested to merge update-liveness-probe into v9.5-2
1 file
+ 2
1
Compare changes
  • Side-by-side
  • Inline
@@ -32,8 +32,9 @@
# 200: normally working base URL
# 302: redirection (NOTE: not sure if there's a legitimate case to expect this)
# 403: fully private websites give this response
# 502: Bad gateway
# 503: high load
if [[ "${HTTP_CODE_BASE}" -eq "500" || "${HTTP_CODE_BASE}" -eq "503" ]]; then
if [[ "${HTTP_CODE_BASE}" -eq "500" || "${HTTP_CODE_BASE}" -eq "502" || "${HTTP_CODE_BASE}" -eq "503" ]]; then
echo "Probe failed" >> $FILE
echo "Probe failed. Endpoint / responds with code: $HTTP_CODE_BASE"
exit 1
Loading