This commit is contained in:
Vladislav Kunetskiy
2026-10-15 22:20:33 +03:00
parent 4e84354642
commit 41bb34b8c6
96 changed files with 6335 additions and 449 deletions
+4
View File
@@ -0,0 +1,4 @@
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": 117, "failed_attempts": 0, "first_recovery_seconds": 1.226}
PASS: failover preserved confirmed data and existing session. Hook scope needs operator evidence.
+4
View File
@@ -0,0 +1,4 @@
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": 126, "failed_attempts": 0, "first_recovery_seconds": 0.217}
PASS: failover preserved confirmed data and existing session. Hook scope needs operator evidence.
+51
View File
@@ -0,0 +1,51 @@
{
"before": {
"instances": [
"20055d51b1e6",
"d106ca21a29a"
]
},
"replicas": [
{
"stopped": "20055d51b1e6",
"stopped_container": "stop-one.sh: stopped api replica(s): mtusi-messenger-lab3-api-2",
"hook_returncode": 0,
"hook_seconds": 0.199,
"hook_error": "",
"successful_writes": 126,
"failed_attempts": 0,
"uncertain_retries": 0,
"first_recovery_seconds": 1.761,
"instances_after_recovery": [
"d106ca21a29a"
],
"messages_in_history": 126,
"restored_seconds": 0.233,
"instances_restored": [
"20055d51b1e6",
"d106ca21a29a"
]
},
{
"stopped": "d106ca21a29a",
"stopped_container": "stop-one.sh: stopped api replica(s): mtusi-messenger-lab3-api-1",
"hook_returncode": 0,
"hook_seconds": 0.208,
"hook_error": "",
"successful_writes": 90,
"failed_attempts": 10,
"uncertain_retries": 10,
"first_recovery_seconds": 5.726,
"instances_after_recovery": [
"20055d51b1e6"
],
"messages_in_history": 216,
"restored_seconds": 0.232,
"instances_restored": [
"20055d51b1e6",
"d106ca21a29a"
]
}
]
}
PASS: каждая реплика остановлена по очереди; записи продолжились, дублей и потерь нет