Files
mtusi2026lab3/evidence/failover-api-1.txt
T

25 lines
1.9 KiB
Plaintext

# before
NAME CONTAINER ID STATE STATUS
mtusi-messenger-lab3-api-1 236cb759e825 running Up About a minute (healthy)
mtusi-messenger-lab3-api-2 787a253aa6a6 running Up 8 seconds (healthy)
$ make test-failover ACTION_SCRIPT=scripts/stop-one.sh
Executing explicit failover hook; hook output suppressed to avoid leaking secrets.
{"observed_instances_before": 2, "successful_writes": 119, "failed_attempts": 1, "first_recovery_seconds": 6.508}
PASS: failover preserved confirmed data and existing session. Hook scope needs operator evidence.
# after: the stopped container is the replica whose id the test passed as TARGET_INSTANCE_ID
NAME CONTAINER ID STATE STATUS
mtusi-messenger-lab3-api-1 236cb759e825 exited Exited (143) 8 seconds ago
mtusi-messenger-lab3-api-2 787a253aa6a6 running Up 24 seconds (healthy)
# HAProxy log around the failure (non-2xx and state changes)
[WARNING] (8) : Server api/api1 was DOWN and now enters maintenance (No IP for server ).
Server api/api1 ('api') is UP/READY (resolves again).
[WARNING] (8) : Server api/api1 ('api') is UP/READY (resolves again).
172.24.0.1:55062 [22/Oct/2026:17:44:22.431] http api/api2 0/0/0/-1/93 502 209 - - SH-- 1/1/0/0/0 0/0 "POST /api/v1/chats/43312e52-5c0b-41af-9981-2379d372b382/messages HTTP/1.1"
[WARNING] (8) : Server api/api2 is DOWN, reason: Layer4 connection problem, info: "Connection refused", check duration: 0ms. 1 active and 0 backup servers left. 0 sessions active, 0 requeued, 0 remaining in queue.
Server api/api2 is DOWN, reason: Layer4 connection problem, info: "Connection refused", check duration: 0ms. 1 active and 0 backup servers left. 0 sessions active, 0 requeued, 0 remaining in queue.
Server api/api2 was DOWN and now enters maintenance (No IP for server ).
[WARNING] (8) : Server api/api2 was DOWN and now enters maintenance (No IP for server ).