forked from mtusi2026/mtusi2026lab5
34 lines
2.1 KiB
Plaintext
34 lines
2.1 KiB
Plaintext
# failover: public failover test for every replica, file downloaded via the other one (make test-failover)
|
|
# date: 2026-10-24 15:42:00, commit: 276dbda + uncommitted changes
|
|
# command: python.exe student-tests/run_failover.py
|
|
# exit code: 0, 40.6 s
|
|
|
|
hook: scripts\stop-one.cmd; api replicas: ['5aa14958c864', 'b9ad6d33d190']
|
|
=== run 1: api containers before
|
|
SERVICE CONTAINER ID STATUS
|
|
api b9ad6d33d190 Up 44 seconds (healthy)
|
|
api 5aa14958c864 Up 43 seconds (healthy)
|
|
Executing explicit failover hook; hook output suppressed to avoid leaking secrets.
|
|
|
|
{"observed_instances_before": 2, "successful_writes": 123, "failed_attempts": 0, "first_recovery_seconds": 4.406}
|
|
|
|
PASS: failover preserved confirmed data and existing session. Hook scope needs operator evidence.
|
|
api containers after
|
|
SERVICE CONTAINER ID STATUS
|
|
api b9ad6d33d190 Up About a minute (healthy)
|
|
api 5aa14958c864 Exited (0) 11 seconds ago
|
|
the hook stopped 5aa14958c864 (X-Instance-Id of that replica = container ID); other api containers kept running, postgres/redis/lb were not touched
|
|
restored: docker start 5aa14958c864 -> healthy and back in HAProxy
|
|
=== run 2: api containers before
|
|
SERVICE CONTAINER ID STATUS
|
|
api b9ad6d33d190 Up About a minute (healthy)
|
|
api 5aa14958c864 Up 2 seconds (healthy)
|
|
Executing explicit failover hook; hook output suppressed to avoid leaking secrets.
|
|
|
|
{"observed_instances_before": 2, "successful_writes": 125, "failed_attempts": 0, "first_recovery_seconds": 4.188}
|
|
|
|
PASS: failover preserved confirmed data and existing session. Hook scope needs operator evidence.
|
|
api containers after
|
|
SERVICE CONTAINER ID STATUS
|
|
api b9ad6d33d190 Exited (0) 11 seconds ago
|
|
api 5aa14958c864 Up 19 seconds (healthy)
|
|
the hook stopped b9ad6d33d190 (X-Instance-Id of that replica = container ID); other api containers kept running, postgres/redis/lb were not touched
|
|
restored: docker start b9ad6d33d190 -> healthy and back in HAProxy
|
|
PASS: public failover test passed 2 times; every api replica was stopped once and restored
|