исправление

This commit is contained in:
2026-10-15 19:44:46 +03:00
parent 825f6fdbf5
commit f7f689c7c2
26 changed files with 482 additions and 399 deletions
+38 -38
View File
@@ -1,48 +1,48 @@
python student-tests/run_failover.py
hook: scripts/stop-one.cmd; api replicas: ['4e5560c6d072', '7740e49a1d8c']
hook: scripts/stop-one.cmd; api replicas: ['1c773748bc05', 'aa3dac85e7ed']
=== run 1: containers before (HAProxy: api1 UP, api2 UP)
SERVICE CONTAINER STATE STARTED AT (UTC)
api 4e5560c6d072 running (healthy) 2026-10-14T20:46:50.376
api 7740e49a1d8c running (healthy) 2026-10-14T20:46:50.691
lb 91c0051bd4c8 running (healthy) 2026-10-14T20:46:51.195
migrate 523965b912bb exited 2026-10-14T20:46:48.669
postgres 5c16b9b684f2 running (healthy) 2026-10-14T21:05:32.785
valkey c74935587700 running (healthy) 2026-10-14T21:05:11.672
api 1c773748bc05 running (healthy) 2026-10-15T16:32:38.776
api aa3dac85e7ed running (healthy) 2026-10-15T16:32:38.423
lb f9c8bda9ea4c running (healthy) 2026-10-15T16:32:39.190
migrate 7420f3f1ddda exited 2026-10-15T16:32:47.434
postgres 5c16b9b684f2 running (healthy) 2026-10-15T16:35:06.670
valkey c74935587700 running (healthy) 2026-10-15T16:34:57.760
Executing explicit failover hook; hook output suppressed to avoid leaking secrets.␍
{"observed_instances_before": 2, "successful_writes": 124, "failed_attempts": 0, "first_recovery_seconds": 4.437}␍
PASS: failover preserved confirmed data and existing session. Hook scope needs operator evidence.
containers after (HAProxy: api2 UP)
SERVICE CONTAINER STATE STARTED AT (UTC)
api 4e5560c6d072 running (healthy) 2026-10-14T20:46:50.376
api 7740e49a1d8c exited 2026-10-14T20:46:50.691
lb 91c0051bd4c8 running (healthy) 2026-10-14T20:46:51.195
migrate 523965b912bb exited 2026-10-14T20:46:48.669
postgres 5c16b9b684f2 running (healthy) 2026-10-14T21:05:32.785
valkey c74935587700 running (healthy) 2026-10-14T21:05:11.672
the hook stopped 7740e49a1d8c (X-Instance-Id of that replica = container ID); other api containers, postgres, valkey and lb kept running
restored: docker start 7740e49a1d8c -> healthy and back in HAProxy (api1 UP, api2 UP)
=== run 2: containers before (HAProxy: api1 UP, api2 UP)
SERVICE CONTAINER STATE STARTED AT (UTC)
api 4e5560c6d072 running (healthy) 2026-10-14T20:46:50.376
api 7740e49a1d8c running (healthy) 2026-10-14T21:07:12.761
lb 91c0051bd4c8 running (healthy) 2026-10-14T20:46:51.195
migrate 523965b912bb exited 2026-10-14T20:46:48.669
postgres 5c16b9b684f2 running (healthy) 2026-10-14T21:05:32.785
valkey c74935587700 running (healthy) 2026-10-14T21:05:11.672
Executing explicit failover hook; hook output suppressed to avoid leaking secrets.␍
{"observed_instances_before": 2, "successful_writes": 124, "failed_attempts": 0, "first_recovery_seconds": 4.594}␍
{"observed_instances_before": 2, "successful_writes": 125, "failed_attempts": 0, "first_recovery_seconds": 5.703}␍
PASS: failover preserved confirmed data and existing session. Hook scope needs operator evidence.
containers after (HAProxy: api1 UP)
SERVICE CONTAINER STATE STARTED AT (UTC)
api 4e5560c6d072 exited 2026-10-14T20:46:50.376
api 7740e49a1d8c running (healthy) 2026-10-14T21:07:12.761
lb 91c0051bd4c8 running (healthy) 2026-10-14T20:46:51.195
migrate 523965b912bb exited 2026-10-14T20:46:48.669
postgres 5c16b9b684f2 running (healthy) 2026-10-14T21:05:32.785
valkey c74935587700 running (healthy) 2026-10-14T21:05:11.672
the hook stopped 4e5560c6d072 (X-Instance-Id of that replica = container ID); other api containers, postgres, valkey and lb kept running
restored: docker start 4e5560c6d072 -> healthy and back in HAProxy (api1 UP, api2 UP)
api 1c773748bc05 running (healthy) 2026-10-15T16:32:38.776
api aa3dac85e7ed exited 2026-10-15T16:32:38.423
lb f9c8bda9ea4c running (healthy) 2026-10-15T16:32:39.190
migrate 7420f3f1ddda exited 2026-10-15T16:32:47.434
postgres 5c16b9b684f2 running (healthy) 2026-10-15T16:35:06.670
valkey c74935587700 running (healthy) 2026-10-15T16:34:57.760
the hook stopped aa3dac85e7ed (X-Instance-Id of that replica = container ID); other api containers, postgres, valkey and lb kept running
restored: docker start aa3dac85e7ed -> healthy and back in HAProxy (api1 UP, api2 UP)
=== run 2: containers before (HAProxy: api1 UP, api2 UP)
SERVICE CONTAINER STATE STARTED AT (UTC)
api 1c773748bc05 running (healthy) 2026-10-15T16:32:38.776
api aa3dac85e7ed running (healthy) 2026-10-15T16:36:08.417
lb f9c8bda9ea4c running (healthy) 2026-10-15T16:32:39.190
migrate 7420f3f1ddda exited 2026-10-15T16:32:47.434
postgres 5c16b9b684f2 running (healthy) 2026-10-15T16:35:06.670
valkey c74935587700 running (healthy) 2026-10-15T16:34:57.760
Executing explicit failover hook; hook output suppressed to avoid leaking secrets.␍
{"observed_instances_before": 2, "successful_writes": 125, "failed_attempts": 0, "first_recovery_seconds": 4.843}␍
PASS: failover preserved confirmed data and existing session. Hook scope needs operator evidence.
containers after (HAProxy: api2 UP)
SERVICE CONTAINER STATE STARTED AT (UTC)
api 1c773748bc05 exited 2026-10-15T16:32:38.776
api aa3dac85e7ed running (healthy) 2026-10-15T16:36:08.417
lb f9c8bda9ea4c running (healthy) 2026-10-15T16:32:39.190
migrate 7420f3f1ddda exited 2026-10-15T16:32:47.434
postgres 5c16b9b684f2 running (healthy) 2026-10-15T16:35:06.670
valkey c74935587700 running (healthy) 2026-10-15T16:34:57.760
the hook stopped 1c773748bc05 (X-Instance-Id of that replica = container ID); other api containers, postgres, valkey and lb kept running
restored: docker start 1c773748bc05 -> healthy and back in HAProxy (api1 UP, api2 UP)
PASS: public failover test passed 2 times; every api replica was stopped once and restored