Completed for a grade of four
This commit is contained in:
+11
-11
@@ -1,24 +1,24 @@
|
||||
# before
|
||||
NAME CONTAINER ID STATE STATUS
|
||||
mtusi-messenger-lab3-api-1 236cb759e825 running Up 8 seconds (healthy)
|
||||
mtusi-messenger-lab3-api-2 787a253aa6a6 running Up About a minute (healthy)
|
||||
mtusi-messenger-lab3-api-1 d1ff13561537 running Up 8 seconds (healthy)
|
||||
mtusi-messenger-lab3-api-2 ac9723acebaa running Up About a minute (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": 120, "failed_attempts": 1, "first_recovery_seconds": 6.537}
|
||||
{"observed_instances_before": 2, "successful_writes": 121, "failed_attempts": 0, "first_recovery_seconds": 5.125}
|
||||
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 running Up 24 seconds (healthy)
|
||||
mtusi-messenger-lab3-api-2 787a253aa6a6 exited Exited (143) 8 seconds ago
|
||||
mtusi-messenger-lab3-api-1 d1ff13561537 running Up 24 seconds (healthy)
|
||||
mtusi-messenger-lab3-api-2 ac9723acebaa exited Exited (143) 10 seconds ago
|
||||
|
||||
# HAProxy log around the failure (non-2xx and state changes)
|
||||
[WARNING] (8) : Server api/api2 was DOWN and now enters maintenance (No IP for server ).
|
||||
Server api/api2 ('api') is UP/READY (resolves again).
|
||||
[WARNING] (8) : Server api/api2 ('api') is UP/READY (resolves again).
|
||||
172.24.0.1:62054 [22/Oct/2026:17:45:16.133] http api/api1 0/0/0/-1/87 502 209 - - SH-- 1/1/0/0/0 0/0 "POST /api/v1/chats/43529cee-e036-4e88-a744-c3fd0e23ce65/messages HTTP/1.1"
|
||||
Server api/api1 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.
|
||||
[WARNING] (8) : Server api/api1 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.
|
||||
[WARNING] (8) : Server api/api2 is UP, reason: Layer7 check passed, code: 200, check duration: 9ms. 2 active and 0 backup servers online. 0 sessions requeued, 0 total in queue.
|
||||
172.24.0.1:64862 [23/Oct/2026:11:38:51.915] http api/api1 0/0/0/69/69 201 504 - - ---- 1/1/0/0/0 0/0 "POST /api/v1/auth/sessions HTTP/1.1"
|
||||
172.24.0.1:64886 [23/Oct/2026:11:38:52.074] http api/api1 0/0/0/26/26 201 500 - - ---- 1/1/0/0/0 0/0 "POST /api/v1/auth/sessions HTTP/1.1"
|
||||
172.24.0.1:64892 [23/Oct/2026:11:38:52.179] http api/api1 0/0/0/24/24 201 500 - - ---- 1/1/0/0/0 0/0 "POST /api/v1/auth/sessions HTTP/1.1"
|
||||
[WARNING] (8) : Server api/api1 is DOWN, reason: Layer7 wrong status, code: 503, info: "Service Unavailable", check duration: 3ms. 1 active and 0 backup servers left. 1 sessions active, 0 requeued, 0 remaining in queue.
|
||||
Server api/api1 is DOWN, reason: Layer7 wrong status, code: 503, info: "Service Unavailable", check duration: 3ms. 1 active and 0 backup servers left. 1 sessions active, 0 requeued, 0 remaining in queue.
|
||||
[WARNING] (8) : Server api/api1 was DOWN and now enters maintenance (No IP for server ).
|
||||
Server api/api1 was DOWN and now enters maintenance (No IP for server ).
|
||||
|
||||
Reference in New Issue
Block a user