From 862b22eb4b660e75132dc748763c233a04229645 Mon Sep 17 00:00:00 2001
From: Francisco Barros <francisco.borges.aurindo.barros@cern.ch>
Date: Mon, 21 Nov 2022 12:38:18 +0100
Subject: [PATCH] Make liveness probe only faily 500/503 error codes

---
 images/drupal-operations-scripts/probe-site.sh | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/images/drupal-operations-scripts/probe-site.sh b/images/drupal-operations-scripts/probe-site.sh
index 48333610d..8434e06ab 100644
--- a/images/drupal-operations-scripts/probe-site.sh
+++ b/images/drupal-operations-scripts/probe-site.sh
@@ -33,7 +33,7 @@
 # 302: redirection (NOTE: not sure if there's a legitimate case to expect this)
 # 403: fully private websites give this response
 # 503: high load
-if [[ "${HTTP_CODE_BASE}" -ne "200" && "${HTTP_CODE_BASE}" -ne "302" && "${HTTP_CODE_BASE}" -ne "403" && "${HTTP_CODE_BASE}" -ne "503" ]]; then
+if [[ "${HTTP_CODE_BASE}" -eq "500" || "${HTTP_CODE_BASE}" -eq "503" ]]; then
     echo "Probe failed" >> $FILE
     echo "Probe failed. Endpoint / responds with code: $HTTP_CODE_BASE"
     exit 1
-- 
GitLab