fix: wait for recreated replicas before restore checks in bench

switch_api recreated the API replica with the same IP while HAProxy
still showed the old container's slot UP, so restore_check hit 503
<NOSRV> before the new process listened. Wait until each new replica
answers /health/ready from inside its container, then for LB UP.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
This commit is contained in:
2026-10-21 01:27:51 +03:00
co-authored by Claude Opus 5.5
parent 116d8d3bf0
commit d56b8928b4
7 changed files with 89 additions and 37 deletions
+7 -2
View File
@@ -685,9 +685,14 @@ apply»):
`pk_message_attachments`, индекс истории прежний.
17. **`variant` в `/openapi.json`** — `enum ["original"]` через
`json_schema_extra`: Literal pydantic пишет `const`.
18. **`bench_restore_quick` нестабилен** из-за гонки стенда (реплика
18. **`bench_restore_quick` падал** из-за гонки стенда (реплика
пересоздаётся с тем же IP, LB держит устаревший `UP`), не из-за
вложений: запись в `KNOWN_ISSUES.md`, исправление — отдельно.
вложений. **Решение основной сессии 2026-10-21: чинить в этом
change** — возможности лаб 2–3 (`bench_restore`) должны работать
после каждого change, а 7.2 — задача `attachments`. `switch_api` ждёт
готовности процесса новой реплики изнутри контейнера, затем `UP` в
LB (design, «Уточнения apply», п. 9); запись `KNOWN_ISSUES.md`
удалена.
#### Вопросы