This commit is contained in:
2026-11-07 17:43:15 +03:00
parent 8cd25e448f
commit 124c83e450
7 changed files with 138 additions and 54 deletions
+35 -28
View File
@@ -1,34 +1,41 @@
# failover run 2026-11-05T16:51:38.6795653+03:00
## run 1 — before
messenger-lab3-api-1 5dce519fa2a3 Up 22 seconds (healthy)
messenger-lab3-api-2 d0fe578a76ab Up 22 seconds (healthy)
# failover run 2026-11-07T17:39:07.3980307+03:00
# 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)
Executing explicit failover hook; hook output suppressed to avoid leaking secrets.
{"observed_instances_before": 2, "successful_writes": 126, "failed_attempts": 0, "first_recovery_seconds": 1.598}
{"observed_instances_before": 2, "successful_writes": 127, "failed_attempts": 0, "first_recovery_seconds": 1.27}
PASS: failover preserved confirmed data and existing session. Hook scope needs operator evidence.
## run 1 — after
messenger-lab3-api-1 5dce519fa2a3 Exited (0) 13 seconds ago
messenger-lab3-api-2 d0fe578a76ab Up 39 seconds (healthy)
## run 2 — before
messenger-lab3-api-1 5dce519fa2a3 Up 6 seconds (healthy)
messenger-lab3-api-2 d0fe578a76ab Up 48 seconds (healthy)
exit=0
## run 1 - after
messenger-lab3-api-1 8b33a91fafee Exited (0) 14 seconds ago
messenger-lab3-api-2 a87734e887a5 Up 2 minutes (healthy)
## 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)
Executing explicit failover hook; hook output suppressed to avoid leaking secrets.
{"observed_instances_before": 2, "successful_writes": 126, "failed_attempts": 0, "first_recovery_seconds": 1.575}
{"observed_instances_before": 2, "successful_writes": 128, "failed_attempts": 0, "first_recovery_seconds": 1.166}
PASS: failover preserved confirmed data and existing session. Hook scope needs operator evidence.
## run 2 — after
messenger-lab3-api-1 5dce519fa2a3 Exited (0) 13 seconds ago
messenger-lab3-api-2 d0fe578a76ab Up About a minute (healthy)
## restored
messenger-lab3-api-1 5dce519fa2a3 Up 6 seconds (healthy)
messenger-lab3-api-2 d0fe578a76ab Up About a minute (healthy)
## run 3 (target api-2) — before
messenger-lab3-api-1 5dce519fa2a3 Up 17 seconds (healthy)
messenger-lab3-api-2 d0fe578a76ab Up About a minute (healthy)
exit=0
## run 2 - after
messenger-lab3-api-1 8b33a91fafee Exited (0) 14 seconds ago
messenger-lab3-api-2 a87734e887a5 Up 3 minutes (healthy)
## 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": 126, "failed_attempts": 0, "first_recovery_seconds": 1.707}
{"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.
## run 3 — after
messenger-lab3-api-1 5dce519fa2a3 Up 34 seconds (healthy)
messenger-lab3-api-2 d0fe578a76ab Exited (0) 13 seconds ago
## restored
messenger-lab3-api-1 5dce519fa2a3 Up 44 seconds (healthy)
messenger-lab3-api-2 d0fe578a76ab Up 6 seconds (healthy)
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)