This commit is contained in:
Vladislav Kunetskiy
2026-10-16 16:39:00 +03:00
parent 4e84354642
commit 1ed57cd49f
98 changed files with 6574 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": 118, "failed_attempts": 0, "first_recovery_seconds": 1.224}
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": 101, "failed_attempts": 0, "first_recovery_seconds": 0.219}
PASS: failover preserved confirmed data and existing session. Hook scope needs operator evidence.
+51
View File
@@ -0,0 +1,51 @@
{
"before": {
"instances": [
"d9b697bac595",
"f53bcf445c6d"
]
},
"replicas": [
{
"stopped": "d9b697bac595",
"stopped_container": "stop-one.sh: stopped api replica(s): mtusi-messenger-lab3-api-3",
"hook_returncode": 0,
"hook_seconds": 0.156,
"hook_error": "",
"successful_writes": 101,
"failed_attempts": 0,
"uncertain_retries": 0,
"first_recovery_seconds": 1.761,
"instances_after_recovery": [
"f53bcf445c6d"
],
"messages_in_history": 101,
"restored_seconds": 0.199,
"instances_restored": [
"d9b697bac595",
"f53bcf445c6d"
]
},
{
"stopped": "f53bcf445c6d",
"stopped_container": "stop-one.sh: stopped api replica(s): mtusi-messenger-lab3-api-4",
"hook_returncode": 0,
"hook_seconds": 0.151,
"hook_error": "",
"successful_writes": 100,
"failed_attempts": 0,
"uncertain_retries": 0,
"first_recovery_seconds": 1.759,
"instances_after_recovery": [
"d9b697bac595"
],
"messages_in_history": 201,
"restored_seconds": 0.174,
"instances_restored": [
"d9b697bac595",
"f53bcf445c6d"
]
}
]
}
PASS: каждая реплика остановлена по очереди; записи продолжились, дублей и потерь нет