From c4365d102ac0f6e53dd84ff35769b467d2a9618a Mon Sep 17 00:00:00 2001 From: chrislu Date: Tue, 18 Nov 2025 17:43:13 -0800 Subject: [PATCH] fix: Wait for volume assignment readiness before running Parquet tests The test-implicit-dir-with-server test was failing with an Internal Error because volume assignment was not ready when tests started. This fix adds a check that attempts a volume assignment and waits for it to succeed before proceeding with tests. This ensures that: 1. Volume servers are registered with the master 2. Volume growth is triggered if needed 3. The system can successfully assign volumes for writes Fixes the timeout issue where boto3 would retry 4 times and fail with 'We encountered an internal error, please try again.' --- test/s3/parquet/Makefile | 25 +++++++++++++++++++++++++ 1 file changed, 25 insertions(+) diff --git a/test/s3/parquet/Makefile b/test/s3/parquet/Makefile index 3123a2e74..5494c04d5 100644 --- a/test/s3/parquet/Makefile +++ b/test/s3/parquet/Makefile @@ -151,6 +151,31 @@ start-seaweedfs-ci: check-binary # Additional wait for filer gRPC to be ready @echo "$(YELLOW)Waiting for filer gRPC to be ready...$(NC)" @sleep 2 + + # Wait for volume server to register with master and ensure volume assignment works + @echo "$(YELLOW)Waiting for volume assignment to be ready...$(NC)" + @for i in $$(seq 1 30); do \ + ASSIGN_RESULT=$$(curl -s "http://localhost:$(MASTER_PORT)/dir/assign?count=1" 2>/dev/null); \ + if echo "$$ASSIGN_RESULT" | grep -q '"fid"'; then \ + echo "$(GREEN)Volume assignment is ready$(NC)"; \ + break; \ + fi; \ + if [ $$i -eq 30 ]; then \ + echo "$(RED)Volume assignment not ready after 30 seconds$(NC)"; \ + echo "=== Last assign attempt ==="; \ + echo "$$ASSIGN_RESULT"; \ + echo "=== Master Status ==="; \ + curl -s "http://localhost:$(MASTER_PORT)/dir/status" 2>/dev/null || echo "Failed to get master status"; \ + echo "=== Master Logs ==="; \ + tail -50 /tmp/seaweedfs-parquet-master.log 2>/dev/null || echo "No master log"; \ + echo "=== Volume Logs ==="; \ + tail -50 /tmp/seaweedfs-parquet-volume.log 2>/dev/null || echo "No volume log"; \ + exit 1; \ + fi; \ + echo "Waiting for volume assignment... ($$i/30)"; \ + sleep 1; \ + done + @echo "$(GREEN)SeaweedFS server started successfully for Parquet testing$(NC)" @echo "Master: http://localhost:$(MASTER_PORT)" @echo "Volume: http://localhost:$(VOLUME_PORT)"