This commit is contained in:
2026-11-11 13:53:51 +03:00
parent 20afc2c790
commit 4afb2ac7b9
138 changed files with 12659 additions and 56 deletions
+12
View File
@@ -0,0 +1,12 @@
#!/usr/bin/env bash
set -euo pipefail
cd "$(dirname "$0")/.."
: "${TARGET_INSTANCE_ID:?Missing tested replica alias}"
for container in $(docker compose ps -q api); do
if [[ "$(docker exec "$container" cat /tmp/instance-id)" == "$TARGET_INSTANCE_ID" ]]; then
docker stop --time 1 "$container" >/dev/null
printf 'Stopped API alias %s, container %.12s\n' "$TARGET_INSTANCE_ID" "$container" >> evidence/failover-hook.txt
exit 0
fi
done
exit 1