fix: keep the same storage containers in the restart hook
- scripts/restart.sh waits for postgres, valkey and s3 with up --wait --no-recreate: Compose 5.4 recreated containers whose image was pulled by the first up (index digest in the label, platform manifest digest on the check), s3-bootstrap could not join the new s3 network namespace (exit 128) and make test-persistence failed on a clean host; found by the CI job on the Gitea runner - record the runner failure, the repro across Compose 5.4.0 and 5.6.1 and the fixed and control runs on a fresh Docker daemon in evidence/tests/ci-application.md, REPORT.md and the docker rule Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
This commit is contained in:
@@ -379,8 +379,14 @@ Hook для `make test-persistence ACTION_SCRIPT=scripts/restart.sh`
|
||||
тестовых данных. Кэш Valkey после рестарта пуст сам: persistence у
|
||||
него выключен. Bucket, учётные записи и объекты S3 — в его volume.
|
||||
- Порядок: `stop haproxy api` → `restart postgres valkey s3` → `up -d
|
||||
--wait postgres valkey s3` (те же контейнеры, ожидание healthcheck) →
|
||||
`start api haproxy`. `start api` запускает и зависимости `migrate` и
|
||||
--wait --no-recreate postgres valkey s3` (те же контейнеры, ожидание
|
||||
healthcheck) → `start api haproxy`. `--no-recreate` обязателен:
|
||||
Compose 5.4 пересоздаёт контейнер, если его образ скачивался при первом
|
||||
`up` (метка — digest индекса, сверка — digest манифеста платформы), и
|
||||
`s3-bootstrap` (`network_mode: service:s3`) после пересоздания `s3` не
|
||||
стартует — код 128, `start api` падает. Нашёл CI на раннере Gitea
|
||||
(`evidence/tests/ci-application.md`); локально образы были в кэше, и
|
||||
Compose 5.6 так не делает. `start api` запускает и зависимости `migrate` и
|
||||
`s3-bootstrap`: повторные миграции и bootstrap — no-op («exists»).
|
||||
Число реплик не меняется: `start` поднимает те же контейнеры, а не
|
||||
масштабирует (реплику, остановленную `stop-one.sh`, тоже). Уборщика
|
||||
|
||||
Reference in New Issue
Block a user