fix: address s3-storage verify findings

- s3 healthcheck and fault hook probe wait for the volume server to
  register with master (first write after restart no longer waits ~5 s)
- s3-bootstrap mounts /data as tmpfs: no anonymous volume per container
- S3 client: NoSuchBucket and AccessDenied are 503 with their own error
  logs, not a missing object or rejected credentials; delete ignores only
  a missing key
- test_isolated verifies prefix removal (weed shell exits 0 on errors)
- s3_check derives ports from listening sockets in the s3 container
- readiness without S3 is also checked with s3 paused

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
This commit is contained in:
2026-10-20 21:23:38 +03:00
co-authored by Claude Opus 5.5
parent 7d340c0673
commit f57635a5fb
19 changed files with 388 additions and 80 deletions
+9 -2
View File
@@ -219,7 +219,11 @@ git ls-files -z -co --exclude-standard | tar --null -T - -cf - | docker build -t
Iceberg, Lance и IAM API выключены. Volume `s3_data:/data`
(`Config.Volumes`), алиас `${S3_HOST}`, публикация только
`127.0.0.1:${S3_OUT_PORT}:${S3_PORT}`. Healthcheck — `wget` на
`/cluster/healthz` master, `/healthz` filer и шлюза, всё на loopback.
`/cluster/healthz` master, непустой `DataNodes` в `/dir/status`
master (том зарегистрирован), `/healthz` filer и шлюза, всё на
loopback. Без проверки тома `healthy` наступал на ~4 с раньше
регистрации, и первая запись ждала её почти весь срок вызова клиента
(5 с). Та же команда — проба `fault_hook.py`.
Лимиты 1 CPU / 512 МБ, `GOMEMLIMIT=400MiB` и
`-s3.concurrentUploadLimitMB=64` (решение 2);
- **`stop_grace_period: 20s`**, а не 10: плавная остановка SeaweedFS
@@ -235,7 +239,10 @@ git ls-files -z -co --exclude-standard | tar --null -T - -cf - | docker build -t
from .env.example»;
- `s3-bootstrap` — `network_mode: service:s3` (master и filer сервера
на его `127.0.0.1`), `user: seaweed`, `restart: "no"`, `tmpfs:
/tmp` и `HOME=/tmp`, скрипт `infra/s3/bootstrap.sh` read-only
[/tmp, /data]` и `HOME=/tmp` (`/data` — volume образа: без tmpfs
каждый новый контейнер bootstrap оставлял анонимный volume, а
пересоздание его переносит — `up -d --renew-anon-volumes
s3-bootstrap` отвязывает старый), скрипт `infra/s3/bootstrap.sh` read-only
длинной записью, `depends_on: s3: service_healthy`, лимиты 0,5 CPU /
128 МБ. Режим `apply` (по умолчанию) идемпотентно сводит состояние
к `.env` (bucket, анонимный доступ `none`, политика `api-objects`,