From 150d084b3bd3b4659a03cc6b5f47a48caa5d003f Mon Sep 17 00:00:00 2001 From: chrislu Date: Sat, 22 Nov 2025 23:18:35 -0800 Subject: [PATCH] fix: use localhost publicUrl and -max=100 for host-based Spark tests MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit The previous fix enabled master-to-volume communication but broke client writes. Problem: - Volume server uses -ip=seaweedfs-volume (Docker hostname) - Master can reach it ✓ - Spark tests run on HOST (not in Docker container) - Host can't resolve 'seaweedfs-volume' → UnknownHostException ✗ Solution: - Keep -ip=seaweedfs-volume for master gRPC communication - Change -publicUrl to 'localhost:8080' for host-based clients - Change -max=0 to -max=100 (matches other integration tests) Why -max=100: - Pre-allocates volume capacity at startup - Volumes ready immediately for writes - Consistent with other test configurations - More reliable than on-demand (-max=0) This configuration allows: - Master → Volume: seaweedfs-volume:18080 (Docker network) - Clients → Volume: localhost:8080 (host network via port mapping) --- test/java/spark/docker-compose.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/test/java/spark/docker-compose.yml b/test/java/spark/docker-compose.yml index 86d78ba2b..713bf68a1 100644 --- a/test/java/spark/docker-compose.yml +++ b/test/java/spark/docker-compose.yml @@ -27,7 +27,7 @@ services: ports: - "8080:8080" - "18080:18080" - command: "volume -mserver=seaweedfs-master:9333 -ip=seaweedfs-volume -ip.bind=0.0.0.0 -port=8080 -port.grpc=18080 -publicUrl=127.0.0.1:8080 -max=0 -dir=/data -preStopSeconds=1" + command: "volume -mserver=seaweedfs-master:9333 -ip=seaweedfs-volume -ip.bind=0.0.0.0 -port=8080 -port.grpc=18080 -publicUrl=localhost:8080 -max=100 -dir=/data -preStopSeconds=1" volumes: - seaweedfs-volume-data:/data depends_on: