Handle demotion gate transport failures safely

This commit is contained in:
Lyncoln
2026-09-17 18:58:14 -04:00
parent 8efa03bf1d
commit 23d8ace330
3 changed files with 62 additions and 9 deletions
@@ -39,7 +39,7 @@ mc_pg_demote_database_shadow()
[ -n "${resource}" ] || return 0
response="$(
if response="$(
timeout --kill-after=1s 5s \
python3 \
"${MC_PROXY_CLIENT:-/usr/lib/ocf/resource.d/loxthelion/managed-container.d/proxy_client.py}" \
@@ -48,8 +48,11 @@ mc_pg_demote_database_shadow()
"demote.database" \
10 \
11
)"
rc=$?
)"; then
rc=0
else
rc=$?
fi
if [ "${rc}" -ne 0 ]; then
ocf_log warn \