level 4, changed to HAProxy

This commit is contained in:
2026-11-07 18:18:43 +03:00
parent 124c83e450
commit eb4e00e412
33 changed files with 3932 additions and 231 deletions
+26 -29
View File
@@ -1,41 +1,38 @@
# failover run 2026-11-07T17:39:07.3980307+03:00
# failover runs 2026-11-07T18:03:34.5946145+03:00 (HAProxy, drain 4 s)
# command (= make test-failover ACTION_SCRIPT=scripts/stop-one.cmd): python tests/resilience.py --mode failover --action-script scripts/stop-one.cmd --base-url http://localhost:8080
## run 1 - before (shift requests through LB: 0)
messenger-lab3-api-1 8b33a91fafee Up 20 seconds (healthy)
messenger-lab3-api-2 a87734e887a5 Up 2 minutes (healthy)
messenger-lab3-api-1 1b755b53e9fa Up 53 seconds (healthy)
messenger-lab3-api-2 e3303afc01b2 Up 53 seconds (healthy)
api1 172.25.0.2 UP
api2 172.25.0.3 UP
Executing explicit failover hook; hook output suppressed to avoid leaking secrets.
{"observed_instances_before": 2, "successful_writes": 127, "failed_attempts": 0, "first_recovery_seconds": 1.27}
{"observed_instances_before": 2, "successful_writes": 121, "failed_attempts": 0, "first_recovery_seconds": 6.421}
PASS: failover preserved confirmed data and existing session. Hook scope needs operator evidence.
exit=0
## run 1 - after
messenger-lab3-api-1 8b33a91fafee Exited (0) 14 seconds ago
messenger-lab3-api-2 a87734e887a5 Up 2 minutes (healthy)
messenger-lab3-api-1 1b755b53e9fa Up About a minute (healthy)
messenger-lab3-api-2 e3303afc01b2 Exited (0) 9 seconds ago
api1 172.25.0.2 UP
## restored (docker compose --env-file .env up -d --wait)
messenger-lab3-api-1 8b33a91fafee Up 6 seconds (healthy)
messenger-lab3-api-2 a87734e887a5 Up 2 minutes (healthy)
## run 2 - before (shift requests through LB: 0)
messenger-lab3-api-1 8b33a91fafee Up 6 seconds (healthy)
messenger-lab3-api-2 a87734e887a5 Up 2 minutes (healthy)
messenger-lab3-api-1 1b755b53e9fa Up About a minute (healthy)
messenger-lab3-api-2 e3303afc01b2 Up 10 seconds (healthy)
api1 172.25.0.2 UP
api2 172.25.0.3 UP
## run 2 - before (shift requests through LB: 1)
messenger-lab3-api-1 1b755b53e9fa Up About a minute (healthy)
messenger-lab3-api-2 e3303afc01b2 Up 11 seconds (healthy)
api1 172.25.0.2 UP
api2 172.25.0.3 UP
Executing explicit failover hook; hook output suppressed to avoid leaking secrets.
{"observed_instances_before": 2, "successful_writes": 128, "failed_attempts": 0, "first_recovery_seconds": 1.166}
{"observed_instances_before": 2, "successful_writes": 115, "failed_attempts": 0, "first_recovery_seconds": 6.437}
PASS: failover preserved confirmed data and existing session. Hook scope needs operator evidence.
exit=0
## run 2 - after
messenger-lab3-api-1 8b33a91fafee Exited (0) 14 seconds ago
messenger-lab3-api-2 a87734e887a5 Up 3 minutes (healthy)
messenger-lab3-api-1 1b755b53e9fa Exited (0) 9 seconds ago
messenger-lab3-api-2 e3303afc01b2 Up 30 seconds (healthy)
api2 172.25.0.3 UP
## restored (docker compose --env-file .env up -d --wait)
messenger-lab3-api-1 8b33a91fafee Up 6 seconds (healthy)
messenger-lab3-api-2 a87734e887a5 Up 3 minutes (healthy)
## run 3 - before (shift requests through LB: 1)
messenger-lab3-api-1 8b33a91fafee Up 6 seconds (healthy)
messenger-lab3-api-2 a87734e887a5 Up 3 minutes (healthy)
Executing explicit failover hook; hook output suppressed to avoid leaking secrets.
{"observed_instances_before": 2, "successful_writes": 127, "failed_attempts": 0, "first_recovery_seconds": 1.213}
PASS: failover preserved confirmed data and existing session. Hook scope needs operator evidence.
exit=0
## run 3 - after
messenger-lab3-api-1 8b33a91fafee Up 22 seconds (healthy)
messenger-lab3-api-2 a87734e887a5 Exited (0) 14 seconds ago
## restored (docker compose --env-file .env up -d --wait)
messenger-lab3-api-1 8b33a91fafee Up 31 seconds (healthy)
messenger-lab3-api-2 a87734e887a5 Up 6 seconds (healthy)
messenger-lab3-api-1 1b755b53e9fa Up 9 seconds (healthy)
messenger-lab3-api-2 e3303afc01b2 Up 43 seconds (healthy)
api1 172.25.0.2 UP
api2 172.25.0.3 UP