2.1 KiB
2.1 KiB
Отказ одной реплики API
- Команды:
make test-failover ACTION_SCRIPT=scripts/stop-one.sh STOP_MODE=stop STOP_ONE_LOG=<файл>,make replicas,make test-failover ACTION_SCRIPT=scripts/stop-one.sh STOP_MODE=kill STOP_ONE_LOG=<файл>,make replicas,make lb_stats - Дата: 2026-10-31, 20:41:38–20:42:18 UTC; оба прогона — код выхода 0
- Commit:
6ba74b1(веткаfeat/unit-of-work), рабочее дерево без правок кода (добавлены только файлыevidence/) - Стенд: проект compose
mtusi-lab5, собранmake run_dockerизHEAD STOP_ONE_LOGназвал реплику: в обоих прогонахTARGET_INSTANCE_ID=057d8e7efce4, контейнер057d8e7efce4…, остановленный контейнер совпадает с целью; между прогонамиmake replicasвернул реплику
stop
{"observed_instances_before": 2, "successful_writes": 116, "failed_attempts": 0, "first_recovery_seconds": 1.719}
PASS: failover preserved confirmed data and existing session. Hook scope needs operator evidence.
2026-10-31T20:41:40Z TARGET_INSTANCE_ID=057d8e7efce4 container=057d8e7efce4c79db09e10ea18dc662a247abe31ec2753d987f7cc8aa1ab365a mode=stop
kill
{"observed_instances_before": 2, "successful_writes": 123, "failed_attempts": 0, "first_recovery_seconds": 0.85}
PASS: failover preserved confirmed data and existing session. Hook scope needs operator evidence.
2026-10-31T20:42:00Z TARGET_INSTANCE_ID=057d8e7efce4 container=057d8e7efce4c79db09e10ea18dc662a247abe31ec2753d987f7cc8aa1ab365a mode=kill
После make replicas
svname addr status check_status scur stot econ wretr wredis hrsp_5xx
api-1 172.31.0.9:8080 UP L7OK 0 304 0 0 0 0
api-2 172.31.0.8:8080 UP L7OK 0 61 0 0 5 0
BACKEND - UP - 0 365 5 0 5 5
free slots: 6