Repository navigation
La Casa Del Dolor: run its S3 server on SeaweedFS instead of MinIO - #131564
Conversation
La Casa got its S3 server from the integration harness, which had exactly one implementation behind `with_minio`: `setup_minio_cmd` always started `docker_compose_minio.yml`, `minio_host` was the literal "minio1", `wait_minio_to_start` always looked up the MinIO redirect proxy, and the instance compose depended on "minio1". So `dolor.py` always ran MinIO, while stateless CI moved to SeaweedFS in ClickHouse#113828. `ClickHouseCluster` now takes `s3_server` ("minio" by default, or "seaweedfs"). With "seaweedfs", `with_minio` starts the new `docker_compose_seaweedfs.yml`: one `seaweedfs1` container running `chrislusf/seaweedfs:4.48` with the flags of `ci/jobs/scripts/functional_tests/setup_seaweedfs.sh`, serving S3 on the MinIO port with the MinIO credentials. Every `minio_*` attribute, the bucket setup, `minio_client` and the `base_minio_cmd` restart hook keep working, so the disks, `dqtmp` and the `s3` named collection La Casa generates point at `seaweedfs1` without changes to `properties.py`. `wait_minio_to_start` also waits for one successful write, because a cold SeaweedFS rejects writes until it has allocated its first volume, and skips the proxy lookup there. `-volume.preStopSeconds=1` drops the 10 s wait a volume server makes before stopping, which only matters in a multi-node SeaweedFS cluster. The filer still waits up to 15 s for its open gRPC streams on SIGTERM (`weed/command/filer.go`, not configurable for `weed server`), so a graceful stop takes about 17 s: `stop_grace_period` is 30 s, so the "manual shutdown" of La Casa's S3 integration is not a SIGKILL. `dolor.py` passes "seaweedfs" unless Spark or an Iceberg REST, Glue or Hive catalog is requested: those shared services are set up against `minio1`, and the CI job enables none of them. The comment from ClickHouse#131475 now says SeaweedFS: it rejects `CompleteMultipartUpload` of parts below 5 MiB with `EntityTooSmall`, the same as MinIO (measured). The FIXME in `sparkserver.py` pointed at a script that no longer exists; it now names `setup_seaweedfs.sh`, whose endpoint, bucket and credentials the values below it are. Co-Authored-By: Claude Opus 5.5 <[email protected]>
An S3 restart in `dolor.py` used to end as soon as `docker compose start` returned. MinIO served again under a second later; SeaweedFS serves an object written before the stop only 14-22 s later (master raft election, then filer and S3 start). When the run's time limit falls in that window, the final teardown stops every server while their S3 disks and S3 `database_disk` point at a server that does not serve yet, and their retried shutdown flushes are the `Server shutdown` failure that ClickHouse#131475 fixed. With the job's flags seed 2 hits it: the teardown began 0.09 s after the start of `seaweedfs1`. Before stopping or killing the S3 server, `dolor.py` now writes `dolor/restart_probe`; after starting it, it waits (at most 60 s) until the server reads that object and accepts a write. Measured: 14.0-18.1 s on SeaweedFS. The harness also rejects `s3_server="seaweedfs"` together with an Iceberg REST, Glue or Hive catalog (their compose files and configs hard-code `minio1`) or with `minio_certs_dir` (the SeaweedFS compose serves plain HTTP), instead of starting a cluster that fails later. Co-Authored-By: Claude Opus 5.5 <[email protected]>
After an S3 restart `wait_s3_server_serving()` only logged a WARNING when the server still did not serve 60 s after its start, and the run went on. The job reads ERROR records only, so the S3 outage never reached its report; the servers stopped later with their S3 disks unreachable were force-killed by the teardown and the run was reported as `Server shutdown`. Now the wait gives the server 120 s (the slowest measured recovery is 22 s), logs an ERROR when it does not serve within that time and ends the run like a failed ClickHouse restart. The job matches that message before the forced-stop one and reports the run as `S3 server restart`. The probe object is written once at startup, right after the bucket is prepared, instead of a best-effort write before each stop, so a failed write before a restart can no longer leave the wait without an object to read. Also wrap three new over-long lines black-style. Co-Authored-By: Claude Opus 5.5 <[email protected]>
The wait after an S3 server restart used the harness S3 client, whose urllib3 pool sets no timeout, so a request falls back to the socket default timeout, which nothing sets (None). A server that accepts the connection and never answers therefore held the wait inside one request, and the 120 s cap, checked only between requests, could not end it: the run went on until the job watchdog. The wait and the startup probe write now use their own client with a 5 s connect and 10 s read timeout and no urllib3 retries, so every iteration ends within about 30 s and a server that never answers ends the run at most about 150 s after its start. The harness client shared by every integration test, and the S3 uploader built on it, are unchanged. Co-Authored-By: Claude Opus 5.5 <[email protected]>
Internal second-model review (rounds 1-4): 3 majors fixed, 1 minor fixed, 1 verification ask answered; round 4 clean
|
|
cc @PedroTadim, could you review this? La Casa Del Dolor now runs its S3 server on SeaweedFS (opt-in s3_server="seaweedfs" in the integration harness, default stays MinIO), and an S3 restart in dolor.py waits until SeaweedFS serves again, failing the run as S3 server restart after 120 s. |
Pre-PR validation gate (click to expand)
Session id: cron:clickhouse-impl-slot-7:20261114-072100 |
|
Workflow [PR], commit [bfb069d] Summary: ✅ AI ReviewSummaryLa Casa Del Dolor now uses SeaweedFS through an optional S3 backend in the integration harness, with updated catalog endpoints, restart targets, and request-size bounds. The earlier readiness-probe findings are addressed in the current code. No remaining actionable findings at Final VerdictStatus: ✅ Approve |
The S3 server is no longer always MinIO, so the flag that disables it is now --without-s3-server. --without-minio stays as an alias, and both still set `with_minio`, the name of the integration harness parameter. Co-Authored-By: Claude Opus 5.5 <[email protected]>
`wait_minio_to_start` probed SeaweedFS write readiness inside its retry loop, after the three buckets were created. A failed probe (the expected cold-start case: SeaweedFS fails writes until its first volume is allocated) made the next pass take the existing-bucket branch, which calls `list_objects_v2`; the pinned SDK (`minio==7.2.20`) has no such method, so every later pass raised `AttributeError` and startup timed out even after the server became writable. The probe now retries in `wait_seaweedfs_writable`, bounded by the same deadline, so the bucket loop runs once. Checked locally with one injected probe failure: before, 1 write attempt, then 175 `AttributeError` passes and `Can't wait Minio to start` after 201 s; after, startup succeeds on the second attempt in 17.7 s. With every probe failing, startup still ends at the 180 s deadline. Co-Authored-By: Claude Opus 5.5 <[email protected]>
|
🕵️ Review — La Casa Del Dolor on SeaweedFS Nice switch; the plumbing checks out (SeaweedFS and ClickHouse share the compose 1. 2. A Unity-only run lands on SeaweedFS ( 3. A SIGKILL restart can spuriously fail the whole run as "S3 server restart" ( 4. The durability oracle doesn't check content ( 5–7 (lower). |
… wait With the default 10 s raft election timeout, a restarted `weed server` serves S3 again only after 13-22 s, so dolor.py waited for the S3 server after each restart, unlike every other integration it restarts. With `-master.electionTimeout=1s` it serves again 3.2-7.3 s after `docker start` (harness, kill and graceful stop, S3 disk attached; 3.2-3.3 s for all five restarts of a La Casa run), so the wait, its probe client and the `S3 server restart` result class are removed. A graceful stop still ends with exit code 0 in 17-19 s; Hashicorp raft and a 300 ms election timeout serve again in 2.3 s but then hang on every graceful stop until the 30 s grace SIGKILLs them. Co-Authored-By: Claude Opus 5.5 <[email protected]>
dolor.py kept MinIO when Spark or an Iceberg REST, Glue or Hive catalog was requested, because those shared services address the S3 server as `minio1:9001`. The SeaweedFS service now has the network alias `minio1`, so they reach SeaweedFS without changes to their compose files, the harness no longer rejects a catalog with s3_server="seaweedfs", and dolor.py always uses SeaweedFS. Two La Casa settings still named the per-catalog MinIO container (`minio`, port 9000) that ClickHouse#102861 removed, which resolves on neither server: the S3 endpoint of the Spark and pyiceberg catalogs in `catalogs/datalakes.py` (`get_instance_ip('minio')` raised `docker.errors.NotFound`), and the BuzzHouse `minio` entry that BuzzHouse uses for catalog storage endpoints, Spark lake paths and the S3Queue `after_processing_move_uri`. Both now use the harness S3 server (`minio_ip`/`minio_host`, `minio_port`). Co-Authored-By: Claude Opus 5.5 <[email protected]>
`wait_seaweedfs_writable` checked its deadline only after a failed call, but the harness client has no socket timeout, so a server that accepts the connection and never answers held the startup forever. The probe now has its own client with connect 5 s / read 10 s timeouts and no retries: against such a listener it raises after 21 s with a 15 s deadline (the old client was still blocked after 90 s). Co-Authored-By: Claude Opus 5.5 <[email protected]>
|
Thanks for the review. Status on the current head:
|
|
🕵️ @groeneai This PR's own After a kill-restart the server can't start again. That message is wrong: SeaweedFS 4.48 accepts Could you cap both at 65535 (for example |
…dFS limits SeaweedFS 4.48 parses the ListObjectsV2 `max-keys` as a 16-bit integer and answers `InvalidArgument` above 65535 (MinIO accepted any value). The S3 disk's `list_object_keys_size` was drawn up to 10 MiB and 2^31 - 1, about 80% of the values, so a `plain_rewritable` disk could not list its metadata and the server did not start again after a kill (PR La Casa run on 0fad72a, exit 243). Draw it from 1 to 65535. SeaweedFS also answers `InvalidArgument` to a DeleteObjects of more than 1000 keys (the S3 limit; MinIO answered `MalformedXML`). `objects_chunk_size_to_delete` was drawn up to 10 MiB and 2^32 - 1, so draw it from 0 to 1000. Validated with the master debug binary and SeaweedFS 4.48 (the PR's compose command): a `plain_rewritable` S3 disk with `list_object_keys_size=10485760` fails to start after kill -9 with the CI message, with 65535 / 1000 it starts and reads its 2000 rows. The Azure disk's `list_object_keys_size` is left as is: it is served by Azurite, which accepts `maxresults` up to 2^31 - 1. Co-Authored-By: Claude Opus 5.5 <[email protected]>
|
Done in 1ededdc:
The rest of the block is within SeaweedFS's limits: Line 813 is the Azure disk, which runs on Azurite, not SeaweedFS. Azurite 3.35.0 lists with |
Related: #131475
Changelog category (leave one):
Changelog entry (a user-readable short description of the changes that goes into CHANGELOG.md):
...
Description
La Casa Del Dolor still ran MinIO (migration asked in #131475 (comment)):
dolor.pygets its S3 server from the integration harness (with_minio), which always startsdocker_compose_minio.yml(minio1and its proxies).This PR adds
ClickHouseCluster(s3_server="seaweedfs"):with_miniothen starts the newdocker_compose_seaweedfs.yml, oneseaweedfs1container (chrislusf/seaweedfs:4.48, as insetup_seaweedfs.sh) serving S3 on the MinIO port with the MinIO credentials, also reachable asminio1, the address of the Iceberg REST and Hive catalog services.dolor.pyalways uses it, Spark and the REST/Glue/Hive catalogs included; the default stays"minio", and TLS still needs MinIO. La Casa settings that still named the per-catalogminio:9000container removed by #102861 (catalogs/datalakes.py, the BuzzHouseminioentry) now name the harness S3 server.SeaweedFS runs with a 1 s raft election timeout: it serves again 3-7 s after a restart (13-22 s with the default 10 s), so an S3 restart needs no wait, like other integrations. A graceful stop takes about 17 s (its filer waits 15 s for open gRPC streams), hence
stop_grace_period: 30s. The #131475 comment now names SeaweedFS, which rejects parts below 5 MiB with the sameEntityTooSmall. La Casa draws the S3 disk'slist_object_keys_sizeandobjects_chunk_size_to_deletewithin its limits (65535 and 1000 keys). SeaweedFS ignores the anonymouss3:PutObjectgrant ofprepare_s3_bucket; La Casa sends no unsigned request.Validation (local, CI
amd_debugbinary of 6e60694): a harness smoke gives identical results on SeaweedFS and on MinIO (S3 function and disk, multipart uploads,EntityTooSmallbelow 5 MiB, data kept over a kill and a graceful stop). La Casa runs exit 0 onseaweedfs1alone. A server stopped right after an S3 restart, withquery_logon an S3 disk, stops in 4-6 s (19-25 s with the default timeout). The REST, Glue and Hive catalogs create, write and read Iceberg tables on SeaweedFS; Spark itself was not run.🤖 Generated with Claude Code
Workflow [PR]
Sync PR [sync-upstream/pr/131564]
Version info
26.11.1.2564-master(included in26.11and later)