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
+11 -6
View File
@@ -193,9 +193,12 @@ services:
aliases:
- ${S3_HOST:-s3}
healthcheck:
# master выбран, filer и шлюз S3 отвечают; всё на loopback. $$ —
# переменная контейнера
test: ["CMD-SHELL", "wget -q -O /dev/null http://127.0.0.1:9333/cluster/healthz && wget -q -O /dev/null http://127.0.0.1:8888/healthz && wget -q -O /dev/null \"http://127.0.0.1:$$S3_PORT/healthz\""]
# master выбран, том зарегистрирован у master (непустой DataNodes в
# /dir/status), filer и шлюз S3 отвечают; всё на loopback. Без
# проверки тома healthy наступал на ~4 с раньше регистрации, и первая
# запись ждала её до ~4,8 с при сроке вызова 5 с. $$ — переменная
# контейнера
test: ["CMD-SHELL", "wget -q -O /dev/null http://127.0.0.1:9333/cluster/healthz && wget -q -O - http://127.0.0.1:9333/dir/status | grep -qF '\"DataNodes\":[{' && wget -q -O /dev/null http://127.0.0.1:8888/healthz && wget -q -O /dev/null \"http://127.0.0.1:$$S3_PORT/healthz\""]
interval: 5s
timeout: 3s
retries: 10
@@ -239,9 +242,12 @@ services:
read_only: true
bind:
create_host_path: false
# файл ключа для curl и политика — только в памяти
# файл ключа для curl и политика — только в памяти. /data — volume
# образа (Config.Volumes): без tmpfs каждый новый контейнер bootstrap
# оставлял бы анонимный volume
tmpfs:
- /tmp
- /data
depends_on:
s3:
condition: service_healthy
@@ -293,8 +299,7 @@ services:
condition: service_healthy
migrate:
condition: service_completed_successfully
# bucket и пользователь API есть до первого запроса; первую запись
# после старта S3 (~2,5 с) делает проверка bootstrap, а не клиент
# bucket и пользователь API есть до первого запроса
s3-bootstrap:
condition: service_completed_successfully
# healthcheck — из образа; SIGKILL не раньше, чем через 10 с