Fix: reject revoked tokens on all replicas when Redis writes fail
This commit is contained in:
+10
-10
@@ -1,24 +1,24 @@
|
||||
# before
|
||||
NAME CONTAINER ID STATE STATUS
|
||||
mtusi-messenger-lab3-api-1 d1ff13561537 running Up 24 seconds (healthy)
|
||||
mtusi-messenger-lab3-api-2 ac9723acebaa running Up 24 seconds (healthy)
|
||||
mtusi-messenger-lab3-api-1 73b8fff02245 running Up 22 seconds (healthy)
|
||||
mtusi-messenger-lab3-api-2 01d14766531f running Up 22 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": 121, "failed_attempts": 0, "first_recovery_seconds": 5.385}
|
||||
{"observed_instances_before": 2, "successful_writes": 125, "failed_attempts": 0, "first_recovery_seconds": 5.401}
|
||||
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 d1ff13561537 exited Exited (143) 9 seconds ago
|
||||
mtusi-messenger-lab3-api-2 ac9723acebaa running Up 40 seconds (healthy)
|
||||
mtusi-messenger-lab3-api-1 73b8fff02245 exited Exited (143) 10 seconds ago
|
||||
mtusi-messenger-lab3-api-2 01d14766531f running Up 38 seconds (healthy)
|
||||
|
||||
# HAProxy log around the failure (non-2xx and state changes)
|
||||
172.24.0.1:57032 [23/Oct/2026:11:37:38.388] http api/api2 0/0/0/97/97 201 500 - - ---- 1/1/0/0/0 0/0 "POST /api/v1/auth/sessions HTTP/1.1"
|
||||
172.24.0.1:58552 [23/Oct/2026:11:37:53.795] http api/api2 0/0/0/86/86 201 504 - - ---- 1/1/0/0/0 0/0 "POST /api/v1/auth/sessions HTTP/1.1"
|
||||
172.24.0.1:58572 [23/Oct/2026:11:37:53.942] http api/api2 0/0/0/78/78 201 500 - - ---- 1/1/0/0/0 0/0 "POST /api/v1/auth/sessions HTTP/1.1"
|
||||
172.24.0.1:58586 [23/Oct/2026:11:37:54.055] http api/api2 0/0/0/81/81 201 500 - - ---- 1/1/0/0/0 0/0 "POST /api/v1/auth/sessions HTTP/1.1"
|
||||
Server api/api2 is DOWN, reason: Layer7 wrong status, code: 503, info: "Service Unavailable", check duration: 5ms. 1 active and 0 backup servers left. 0 sessions active, 0 requeued, 0 remaining in queue.
|
||||
172.24.0.1:59474 [23/Oct/2026:19:02:09.419] http api/api2 0/0/0/55/55 201 500 - - ---- 1/1/0/0/0 0/0 "POST /api/v1/auth/sessions HTTP/1.1"
|
||||
172.24.0.1:56176 [23/Oct/2026:19:02:23.431] http api/api2 0/0/0/73/73 201 504 - - ---- 1/1/0/0/0 0/0 "POST /api/v1/auth/sessions HTTP/1.1"
|
||||
172.24.0.1:56204 [23/Oct/2026:19:02:23.611] http api/api2 0/0/0/27/27 201 500 - - ---- 1/1/0/0/0 0/0 "POST /api/v1/auth/sessions HTTP/1.1"
|
||||
172.24.0.1:56220 [23/Oct/2026:19:02:23.714] http api/api2 0/0/0/50/50 201 500 - - ---- 1/1/0/0/0 0/0 "POST /api/v1/auth/sessions HTTP/1.1"
|
||||
[WARNING] (8) : Server api/api2 is DOWN, reason: Layer7 wrong status, code: 503, info: "Service Unavailable", check duration: 5ms. 1 active and 0 backup servers left. 0 sessions active, 0 requeued, 0 remaining in queue.
|
||||
Server api/api2 is DOWN, reason: Layer7 wrong status, code: 503, info: "Service Unavailable", check duration: 5ms. 1 active and 0 backup servers left. 0 sessions active, 0 requeued, 0 remaining in queue.
|
||||
[WARNING] (8) : Server api/api2 was DOWN and now enters maintenance (No IP for server ).
|
||||
Server api/api2 was DOWN and now enters maintenance (No IP for server ).
|
||||
|
||||
Reference in New Issue
Block a user