forked from mtusi2026/mtusi2026lab3
50 lines
3.3 KiB
Plaintext
50 lines
3.3 KiB
Plaintext
# make test-failover: stop-one.sh останавливает реплику, обслужившую тест; затем вторую
|
|
# date: 2026-11-01T14:24:26Z
|
|
# commit: 210ff67 (dirty)
|
|
|
|
## Прогон 1
|
|
### до
|
|
/messenger-lab3-api-10 id=2701b0d53e0f running exit=0 finished=2026-11-01T14:24:22.65057843Z
|
|
/messenger-lab3-api-9 id=75ad096eed0a running exit=0 finished=2026-11-01T14:24:22.658060985Z
|
|
|
|
$ make test-failover ACTION_SCRIPT=scripts/stop-one.sh
|
|
python3 tests/resilience.py --mode failover --action-script "scripts/stop-one.sh" --base-url "http://lb:8080"
|
|
Executing explicit failover hook; hook output suppressed to avoid leaking secrets.
|
|
{"observed_instances_before": 2, "successful_writes": 126, "failed_attempts": 0, "first_recovery_seconds": 3.475}
|
|
PASS: failover preserved confirmed data and existing session. Hook scope needs operator evidence.
|
|
|
|
### после: остановленная реплика Exited (0) — штатное завершение по SIGTERM
|
|
/messenger-lab3-api-10 id=2701b0d53e0f running exit=0 finished=2026-11-01T14:24:22.65057843Z
|
|
/messenger-lab3-api-9 id=75ad096eed0a exited exit=0 finished=2026-11-01T14:24:30.362206587Z
|
|
|
|
### журнал HAProxy
|
|
Server api/api2 is UP, reason: Layer7 check passed, code: 200, check duration: 2ms. 1 active and 0 backup servers online. 0 sessions requeued, 0 total in queue.
|
|
Server api/api1 is UP, reason: Layer7 check passed, code: 200, check duration: 1ms. 2 active and 0 backup servers online. 0 sessions requeued, 0 total in queue.
|
|
Server api/api2 is DOWN, reason: Layer7 wrong status, code: 503, info: "Service Unavailable", check duration: 1ms. 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 ).
|
|
|
|
## Прогон 2
|
|
### до
|
|
/messenger-lab3-api-10 id=2701b0d53e0f running exit=0 finished=2026-11-01T14:24:22.65057843Z
|
|
/messenger-lab3-api-9 id=75ad096eed0a running exit=0 finished=2026-11-01T14:24:30.362206587Z
|
|
|
|
$ make test-failover ACTION_SCRIPT=scripts/stop-one.sh
|
|
python3 tests/resilience.py --mode failover --action-script "scripts/stop-one.sh" --base-url "http://lb:8080"
|
|
Executing explicit failover hook; hook output suppressed to avoid leaking secrets.
|
|
{"observed_instances_before": 2, "successful_writes": 131, "failed_attempts": 0, "first_recovery_seconds": 3.43}
|
|
PASS: failover preserved confirmed data and existing session. Hook scope needs operator evidence.
|
|
|
|
### после: остановленная реплика Exited (0) — штатное завершение по SIGTERM
|
|
/messenger-lab3-api-10 id=2701b0d53e0f exited exit=0 finished=2026-11-01T14:24:49.840732823Z
|
|
/messenger-lab3-api-9 id=75ad096eed0a running exit=0 finished=2026-11-01T14:24:30.362206587Z
|
|
|
|
### журнал HAProxy
|
|
Server api/api1 is DOWN, reason: Layer7 wrong status, code: 503, info: "Service Unavailable", check duration: 1ms. 1 active and 0 backup servers left. 0 sessions active, 0 requeued, 0 remaining in queue.
|
|
Server api/api1 was DOWN and now enters maintenance (No IP for server ).
|
|
|
|
## Проверка guard: stop-one.sh отказывается останавливать не api
|
|
$ env TARGET_INSTANCE_ID=eb4e6be5ba1d sh scripts/stop-one.sh
|
|
refusing to stop eb4e6be5ba1d: not an api replica of messenger-lab3 (messenger-lab3/postgres)
|
|
EXIT CODE 1
|
|
|