forked from mtusi2026/mtusi2026lab3
19 lines
962 B
Plaintext
19 lines
962 B
Plaintext
$ api replicas before (api_2 restored with: podman compose start api)
|
|
messenger-lab3_api_1 hostname=0405cf8a4a54 Up 2 minutes
|
|
messenger-lab3_api_2 hostname=2751ae93e6d1 Up 19 seconds
|
|
|
|
$ curl -s localhost:8080/health/live (shift round-robin so the test write lands on the other replica)
|
|
{"status":"ok"}
|
|
|
|
|
|
$ make test-failover ACTION_SCRIPT=scripts/stop-one.sh
|
|
python3 tests/resilience.py --mode failover --action-script "scripts/stop-one.sh" --base-url "http://localhost:8080"
|
|
Executing explicit failover hook; hook output suppressed to avoid leaking secrets.
|
|
{"observed_instances_before": 2, "successful_writes": 81, "failed_attempts": 1, "first_recovery_seconds": 2.424}
|
|
PASS: failover preserved confirmed data and existing session. Hook scope needs operator evidence.
|
|
exit=0
|
|
|
|
$ api replicas after (stopped one = TARGET_INSTANCE_ID)
|
|
messenger-lab3_api_1 hostname=0405cf8a4a54 Exited (0) 15 seconds ago
|
|
messenger-lab3_api_2 hostname=2751ae93e6d1 Up 35 seconds
|