Repository navigation
Cherry pick #115512 to 26.7: Keep the SeaweedFS mini admin gRPC port out of the ephemeral range - #119267
Merged
Conversation
test_database_iceberg_seaweedfs_catalog could fail during fixture setup with a Connection refused from wait_for_seaweedfs, which reads as "the Iceberg REST catalog never started". That reading is wrong: the catalog answered HTTP 200 on all 314 polls, and the Connection refused was only the final poll, issued after the container had already exited 255. weed mini derives its admin gRPC port as admin.port + 10000, i.e. 23646 + 10000 = 33646, which is inside the Linux ephemeral range (floor 32768). One of mini's own startup dials can therefore take 33646 as an outbound source port before the admin server binds it, and the listen fails with "bind: address already in use" (mini.go:1583). Admin is the only derived gRPC port above the floor: mini derives exactly five of them (master 19333, filer 18888, volume 19340, s3 18333, admin 33646), and WebDAV and Iceberg carry a null gRPC pointer so they derive nothing. The failure then masks itself. glog.Fatalf (mini.go:1598) skips defer close(allServicesReady), and ensureMiniTableBuckets, which creates -tableBucket=analytics, runs only after <-allServicesReady. So the Iceberg service keeps answering 200 while the analytics bucket is never created, and the fixture's "analytics" in buckets condition can never become true. Pinning -admin.port=12646 makes the derived port 22646: below the ephemeral floor, and below the 22768 cap SeaweedFS uses for this same problem in its own test port allocator (seaweedfs/seaweedfs#10209, which left the mini default alone). The default is still 23646 on tags 4.41, 4.42 and upstream master, so bumping the image does not help. -admin.ui=false does not help either: startMiniAdminWithWorker is launched unconditionally and miniEnableAdminUI only affects the welcome banner. Extending the fixture wait cannot help, because the container is dead and the bucket is never created. Validated by forcing the collision with docker run --sysctl net.ipv4.ip_local_port_range="33646 33646" on chrislusf/seaweedfs:4.41: without the pin the CI log reproduces verbatim at both mini.go:1583 and mini.go:1598 including the two-minute readiness gap, and the analytics bucket is never created; with the pin it is. A control run on the default range passes unpinned, so the harness is not trivially red. The integration test itself passes and its container log reports Admin UI: ...:12646, where the same run on unpinned master reports ...:23646. The other SeaweedFS entry point, ci/jobs/scripts/functional_tests/ setup_seaweedfs.sh, needs no change: it runs weed server, which has no admin server, and already pins ports deriving to 21111..21114. The same collision reaches users through the two documented setups, so they are pinned as well: the SeaweedFS catalog guide's docker-compose.yml and the SeaweedFS connector page's docker run. Both pin image :latest, and admin.port is still 23646 there. Their symptom is worse than the test's, because the bucket each page tells the reader to use is the one that is never created, while the container keeps answering HTTP 200: the guide's CREATE DATABASE against s3://analytics and the connector page's clickhouse bucket both fail against a container that looks healthy. Verified on chrislusf/seaweedfs:latest with the same forced collision, once per page: unpinned, neither "created bucket clickhouse" nor "created table bucket analytics" appears and the container exits 255; pinned, each bucket is created and the container reports Admin UI: ...:12646. Both snippets keep publishing only 8333 and 8181, so the pinned admin port stays inside the container. The eight locale copies of the guide are left alone: they are generated from the English source (docs/README.md), so editing them by hand would be overwritten. CI report: https://s3.amazonaws.com/clickhouse-test-reports/json.html?PR=109368&sha=4443610796f2ef985ff5615a261456a7ea4155ea&name_0=PR&name_1=Integration%20tests%20%28amd_tsan%2C%205%2F6%29 Related: #109368 Upstream: seaweedfs/seaweedfs#10838
…t-ephemeral Keep the SeaweedFS mini admin gRPC port out of the ephemeral range
Member
|
Closing as not the real solution to fix the flakiness |
Member
|
Still worth to backport |
…out of the ephemeral range Conflict resolution: the two .mdx documentation files touched by the original PR do not exist on the 26.7 release branch, so only the compose-file change (pinning -admin.port=12646) is backported. Co-Authored-By: Claude Opus 5 (1M context) <[email protected]>
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Original pull-request #115512
Do not merge this PR manually
This pull-request is a first step of an automated backporting.
It contains changes similar to calling
git cherry-picklocally.If you intend to continue backporting the changes, then resolve all conflicts if any.
Otherwise, if you do not want to backport them, then just close this pull-request.
The check results does not matter at this step - you can safely ignore them.
Before you resolve anything
Conflicts are often caused by a prerequisite change that has not been backported yet, rather than by a real divergence. The bot re-tries this cherry-pick against the release branch on every run, so if that is the case here it will merge itself as soon as the prerequisite lands, and you will see a comment saying so. Manual resolution is only needed while the conflict persists.
Troubleshooting
If the conflicts were resolved in a wrong way
If this cherry-pick PR is completely screwed by a wrong conflicts resolution, and you want to recreate it:
pr-cherrypicklabel from the PRYou also need to check the Original pull-request for
pr-backports-createdlabel, and delete if it's presented thereThe PR source
The PR is created in the CI job