# make test-persistence: restart of LB, all API replicas, PostgreSQL, Valkey
# 2026-10-19T15:11:37Z, commit 2708732 fix: LB и на [::1] — localhost на Windows стоил 2 с на запрос; сдвиг цели failover

Containers BEFORE:
mtusi-lab3-api-1         host=94b38b941a8d  running  exit=0   pid=23944  started=2026-10-19T15:10:34.257
mtusi-lab3-api-2         host=a8d9cffd7a6e  running  exit=0   pid=23887  started=2026-10-19T15:10:33.970
mtusi-lab3-lb-1          host=d903237b9e99  running  exit=0   pid=24172  started=2026-10-19T15:10:40.108
mtusi-lab3-migrate-1     host=d39cf5a2265b  exited   exit=0   pid=0      started=2026-10-19T15:10:31.699
mtusi-lab3-postgres-1    host=3ee559fb5f7f  running  exit=0   pid=23533  started=2026-10-19T15:10:25.911
mtusi-lab3-valkey-1      host=8594c96d36f9  running  exit=0   pid=23621  started=2026-10-19T15:10:26.220

$ make test-persistence ACTION_SCRIPT=scripts/restart.cmd
python tests/resilience.py --mode persistence --action-script "scripts/restart.cmd" --base-url "http://localhost:8080" 
Executing explicit persistence hook; hook output suppressed to avoid leaking secrets.
PASS: persistence preserved confirmed data and existing session. Hook scope needs operator evidence.
[exit 0, 22.6 s]

Containers AFTER (new pid/started for lb, api-*, postgres, valkey; volumes kept):
mtusi-lab3-api-1         host=94b38b941a8d  running  exit=0   pid=27148  started=2026-10-19T15:11:53.132
mtusi-lab3-api-2         host=a8d9cffd7a6e  running  exit=0   pid=27091  started=2026-10-19T15:11:52.824
mtusi-lab3-lb-1          host=d903237b9e99  running  exit=0   pid=27452  started=2026-10-19T15:11:59.277
mtusi-lab3-migrate-1     host=d39cf5a2265b  exited   exit=0   pid=0      started=2026-10-19T15:11:54.449
mtusi-lab3-postgres-1    host=3ee559fb5f7f  running  exit=0   pid=26819  started=2026-10-19T15:11:44.558
mtusi-lab3-valkey-1      host=8594c96d36f9  running  exit=0   pid=26779  started=2026-10-19T15:11:44.461

$ C:\Users\wfa22\AppData\Local\Python\pythoncore-3.14-64\python.exe scripts/lbctl.py wait-up 2
2 API replica(s) UP in HAProxy after 0.6 s: ['94b38b941a8d', 'a8d9cffd7a6e']
[exit 0, 1.4 s]
