feat: перенос логики с 4лабф

This commit is contained in:
Enterxx2
2026-11-09 22:33:50 +03:00
parent 276dbdad8a
commit 1d8dfb7ea4
166 changed files with 13171 additions and 6 deletions
+21
View File
@@ -0,0 +1,21 @@
## instances before
CONTAINER STATE INSTANCE PID REVISION
messenger-lab4-api-1 running/healthy 0fd6b920cefc 2735 dev
messenger-lab4-api-2 running/healthy 5a67f0c47be1 2687 dev
## make test-failover ACTION_SCRIPT=scripts/stop-one.sh
{"observed_instances_before": 2, "successful_writes": 130, "failed_attempts": 0, "first_recovery_seconds": 2.058}
PASS: failover preserved confirmed data and existing session. Hook scope needs operator evidence.
## instances after (stopped replica stays stopped)
CONTAINER STATE INSTANCE PID REVISION
messenger-lab4-api-1 exited/unhealthy - 0 dev
messenger-lab4-api-2 running/healthy 5a67f0c47be1 2687 dev
## second run after scripts/restore.sh
CONTAINER STATE INSTANCE PID REVISION
messenger-lab4-api-1 running/healthy 04c6c919ec65 5688 dev
messenger-lab4-api-2 running/healthy 5a67f0c47be1 2687 dev
{"observed_instances_before": 2, "successful_writes": 129, "failed_attempts": 0, "first_recovery_seconds": 1.618}
PASS: failover preserved confirmed data and existing session. Hook scope needs operator evidence.
CONTAINER STATE INSTANCE PID REVISION
messenger-lab4-api-1 exited/unhealthy - 0 dev
messenger-lab4-api-2 running/healthy 5a67f0c47be1 2687 dev