Skip to content

SeaweedFS is a distributed storage system for object storage (S3), file systems, Iceberg table buckets, and Lance vector buckets, designed to handle billions of files with O(1) disk access and effortless horizontal scaling.

fix(fuse-tests): avoid ephemeral port reuse racing weed mini bind

Chris Lu32cbed965805
diff --git a/test/fuse_integration/framework_test.go b/test/fuse_integration/framework_test.go
index e75c833486..b7f61e0aab 100644
--- a/test/fuse_integration/framework_test.go
+++ b/test/fuse_integration/framework_test.go
@@ -84,11 +84,14 @@ func NewFuseTestFramework(t *testing.T, config *TestConfig) *FuseTestFramework {
// freePort asks the OS for a free TCP port in a range where the gRPC
// offset (port + 10000) won't collide with well-known ports.
+// Stay below the Linux ephemeral floor (32768) so the kernel does not
+// reuse the chosen port for an outbound connection between close() here
+// and re-bind in the child "weed mini" process.
func freePort(t *testing.T) int {
t.Helper()
const (
minServicePort = 20000
- maxServicePort = 55535
+ maxServicePort = 32000
)
portCount := maxServicePort - minServicePort + 1
@@ -247,6 +250,7 @@ func (f *FuseTestFramework) startMini(config *TestConfig) error {
"mini",
"-dir=" + f.dataDir,
"-ip=127.0.0.1",
+ "-ip.bind=127.0.0.1",
"-filer.port=" + strconv.Itoa(f.filerPort),
"-s3=false",
"-webdav=false",