исправление

This commit is contained in:
2026-10-26 19:40:34 +03:00
parent a591243d80
commit aaab3ac8b2
37 changed files with 1749 additions and 389 deletions
+47 -47
View File
@@ -1,64 +1,64 @@
python student-tests/run_failover.py
hook: scripts/stop-one.cmd; api replicas: ['b0db3e40abfe', 'ef44b0d4c0a1']
hook: scripts/stop-one.cmd; api replicas: ['48dc392933dc', 'c1b7e1ab5673']
=== run 1: containers before (HAProxy: api1 UP, api2 UP)
SERVICE CONTAINER STATE STARTED AT (UTC)
api b0db3e40abfe running (healthy) 2026-10-25T18:28:33.999
api ef44b0d4c0a1 running (healthy) 2026-10-25T18:23:36.756
broker 9f909ed7ecea running (healthy) 2026-10-25T18:23:53.670
lb 8be67a2e86b7 running (healthy) 2026-10-25T18:20:04.043
migrate e6c2c825d38d exited 2026-10-25T18:28:07.167
postgres d2bfd48385f1 running (healthy) 2026-10-25T18:19:54.204
s3 892c7ca290f2 running (healthy) 2026-10-25T18:29:00.995
s3-init 08c2e7925d67 exited 2026-10-25T18:28:07.169
valkey 4e223cb9301e running (healthy) 2026-10-25T18:19:54.202
worker d9eced386d93 running (healthy) 2026-10-25T18:28:09.870
api 48dc392933dc running (healthy) 2026-10-26T16:24:32.726
api c1b7e1ab5673 running (healthy) 2026-10-26T16:18:45.657
broker 9f909ed7ecea running (healthy) 2026-10-26T16:19:00.163
lb 8be67a2e86b7 running (healthy) 2026-10-26T16:15:42.154
migrate a5a9934b4d6b exited 2026-10-26T16:23:38.842
postgres d2bfd48385f1 running (healthy) 2026-10-26T16:15:17.840
s3 892c7ca290f2 running (healthy) 2026-10-26T16:24:57.683
s3-init deab1aa2b022 exited 2026-10-26T16:23:38.843
valkey 4e223cb9301e running (healthy) 2026-10-26T16:15:17.820
worker 292a36c54a41 running (healthy) 2026-10-26T16:23:41.416
Executing explicit failover hook; hook output suppressed to avoid leaking secrets.␍
{"observed_instances_before": 2, "successful_writes": 119, "failed_attempts": 0, "first_recovery_seconds": 5.11}␍
{"observed_instances_before": 2, "successful_writes": 124, "failed_attempts": 0, "first_recovery_seconds": 4.531}␍
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 b0db3e40abfe running (healthy) 2026-10-25T18:28:33.999
api ef44b0d4c0a1 exited 2026-10-25T18:23:36.756
broker 9f909ed7ecea running (healthy) 2026-10-25T18:23:53.670
lb 8be67a2e86b7 running (healthy) 2026-10-25T18:20:04.043
migrate e6c2c825d38d exited 2026-10-25T18:28:07.167
postgres d2bfd48385f1 running (healthy) 2026-10-25T18:19:54.204
s3 892c7ca290f2 running (healthy) 2026-10-25T18:29:00.995
s3-init 08c2e7925d67 exited 2026-10-25T18:28:07.169
valkey 4e223cb9301e running (healthy) 2026-10-25T18:19:54.202
worker d9eced386d93 running (healthy) 2026-10-25T18:28:09.870
the hook stopped ef44b0d4c0a1 (X-Instance-Id of that replica = container ID); other api containers, postgres, valkey, s3 and lb kept running
restored: docker start ef44b0d4c0a1 -> healthy and back in HAProxy (api1 UP, api2 UP)
api 48dc392933dc exited 2026-10-26T16:24:32.726
api c1b7e1ab5673 running (healthy) 2026-10-26T16:18:45.657
broker 9f909ed7ecea running (healthy) 2026-10-26T16:19:00.163
lb 8be67a2e86b7 running (healthy) 2026-10-26T16:15:42.154
migrate a5a9934b4d6b exited 2026-10-26T16:23:38.842
postgres d2bfd48385f1 running (healthy) 2026-10-26T16:15:17.840
s3 892c7ca290f2 running (healthy) 2026-10-26T16:24:57.683
s3-init deab1aa2b022 exited 2026-10-26T16:23:38.843
valkey 4e223cb9301e running (healthy) 2026-10-26T16:15:17.820
worker 292a36c54a41 running (healthy) 2026-10-26T16:23:41.416
the hook stopped 48dc392933dc (X-Instance-Id of that replica = container ID); other api containers, postgres, valkey, s3 and lb kept running
restored: docker start 48dc392933dc -> 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 b0db3e40abfe running (healthy) 2026-10-25T18:28:33.999
api ef44b0d4c0a1 running (healthy) 2026-10-25T18:30:14.430
broker 9f909ed7ecea running (healthy) 2026-10-25T18:23:53.670
lb 8be67a2e86b7 running (healthy) 2026-10-25T18:20:04.043
migrate e6c2c825d38d exited 2026-10-25T18:28:07.167
postgres d2bfd48385f1 running (healthy) 2026-10-25T18:19:54.204
s3 892c7ca290f2 running (healthy) 2026-10-25T18:29:00.995
s3-init 08c2e7925d67 exited 2026-10-25T18:28:07.169
valkey 4e223cb9301e running (healthy) 2026-10-25T18:19:54.202
worker d9eced386d93 running (healthy) 2026-10-25T18:28:09.870
api 48dc392933dc running (healthy) 2026-10-26T16:25:57.020
api c1b7e1ab5673 running (healthy) 2026-10-26T16:18:45.657
broker 9f909ed7ecea running (healthy) 2026-10-26T16:19:00.163
lb 8be67a2e86b7 running (healthy) 2026-10-26T16:15:42.154
migrate a5a9934b4d6b exited 2026-10-26T16:23:38.842
postgres d2bfd48385f1 running (healthy) 2026-10-26T16:15:17.840
s3 892c7ca290f2 running (healthy) 2026-10-26T16:24:57.683
s3-init deab1aa2b022 exited 2026-10-26T16:23:38.843
valkey 4e223cb9301e running (healthy) 2026-10-26T16:15:17.820
worker 292a36c54a41 running (healthy) 2026-10-26T16:23:41.416
Executing explicit failover hook; hook output suppressed to avoid leaking secrets.␍
{"observed_instances_before": 2, "successful_writes": 125, "failed_attempts": 0, "first_recovery_seconds": 5.531}␍
{"observed_instances_before": 2, "successful_writes": 124, "failed_attempts": 0, "first_recovery_seconds": 4.594}␍
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 b0db3e40abfe exited 2026-10-25T18:28:33.999
api ef44b0d4c0a1 running (healthy) 2026-10-25T18:30:14.430
broker 9f909ed7ecea running (healthy) 2026-10-25T18:23:53.670
lb 8be67a2e86b7 running (healthy) 2026-10-25T18:20:04.043
migrate e6c2c825d38d exited 2026-10-25T18:28:07.167
postgres d2bfd48385f1 running (healthy) 2026-10-25T18:19:54.204
s3 892c7ca290f2 running (healthy) 2026-10-25T18:29:00.995
s3-init 08c2e7925d67 exited 2026-10-25T18:28:07.169
valkey 4e223cb9301e running (healthy) 2026-10-25T18:19:54.202
worker d9eced386d93 running (healthy) 2026-10-25T18:28:09.870
the hook stopped b0db3e40abfe (X-Instance-Id of that replica = container ID); other api containers, postgres, valkey, s3 and lb kept running
restored: docker start b0db3e40abfe -> healthy and back in HAProxy (api1 UP, api2 UP)
api 48dc392933dc running (healthy) 2026-10-26T16:25:57.020
api c1b7e1ab5673 exited 2026-10-26T16:18:45.657
broker 9f909ed7ecea running (healthy) 2026-10-26T16:19:00.163
lb 8be67a2e86b7 running (healthy) 2026-10-26T16:15:42.154
migrate a5a9934b4d6b exited 2026-10-26T16:23:38.842
postgres d2bfd48385f1 running (healthy) 2026-10-26T16:15:17.840
s3 892c7ca290f2 running (healthy) 2026-10-26T16:24:57.683
s3-init deab1aa2b022 exited 2026-10-26T16:23:38.843
valkey 4e223cb9301e running (healthy) 2026-10-26T16:15:17.820
worker 292a36c54a41 running (healthy) 2026-10-26T16:23:41.416
the hook stopped c1b7e1ab5673 (X-Instance-Id of that replica = container ID); other api containers, postgres, valkey, s3 and lb kept running
restored: docker start c1b7e1ab5673 -> healthy and back in HAProxy (api1 UP, api2 UP)
PASS: public failover test passed 2 times; every api replica was stopped once and restored