From 0f12f5d6f11624581e5b7fab022ca04bc0b1ba30 Mon Sep 17 00:00:00 2001 From: Rene Cannao Date: Mon, 23 Mar 2026 16:48:26 +0000 Subject: [PATCH] Fix TAP_CLUSTER_NODES: include primary (6032) as first entry MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit test_cluster1-t expects conns[0] to be the primary ProxySQL instance. TAP_CLUSTER_NODES only listed nodes 1-9 (ports 6042-6122), so the test loop operated on nodes 1-4 instead of primary + nodes 1-3. Node 4 (port 6072) is NOT in proxysql_servers (only core nodes 1-3 are registered), so changes on node 4 were invisible to the cluster — sync could never detect them, causing the 30-second timeout. Now TAP_CLUSTER_NODES starts with proxysql:6032 (primary), matching the old cluster_ports layout where 6032 was the first entry. Fixes #5535. --- test/infra/control/env-isolated.bash | 16 ++++++++++------ 1 file changed, 10 insertions(+), 6 deletions(-) diff --git a/test/infra/control/env-isolated.bash b/test/infra/control/env-isolated.bash index 33d2b241d..4585a2258 100755 --- a/test/infra/control/env-isolated.bash +++ b/test/infra/control/env-isolated.bash @@ -59,18 +59,22 @@ export TAP_DEPS="${WORKSPACE}/test/tap/tap" export TEST_DEPS_PATH="${WORKSPACE}/test-scripts/deps" export TEST_DEPS="${TEST_DEPS_PATH}" -# Cluster Nodes — all run inside the ProxySQL container on different ports -# Port scheme: proxy-node1=6042, proxy-node2=6052, ..., proxy-node9=6122 +# Cluster Nodes — primary (6032) + nodes inside the ProxySQL container +# Port scheme: primary=6032, proxy-node1=6042, proxy-node2=6052, ..., proxy-node9=6122 # From the test-runner container, reach them via the proxysql hostname +# NOTE: primary MUST be first — test_cluster1-t expects conns[0] to be the primary NUM_CLUSTER_NODES=${PROXYSQL_CLUSTER_NODES:-9} if [[ "${SKIP_CLUSTER_START}" == "1" ]] || [[ "${SKIP_CLUSTER_START}" == "true" ]]; then NUM_CLUSTER_NODES=0 fi CLUSTER_NODES="" -for i in $(seq 1 ${NUM_CLUSTER_NODES}); do - PORT=$((6032 + i * 10)) - CLUSTER_NODES="${CLUSTER_NODES}proxysql:${PORT}," -done +if [ "${NUM_CLUSTER_NODES}" -gt 0 ]; then + CLUSTER_NODES="proxysql:6032," + for i in $(seq 1 ${NUM_CLUSTER_NODES}); do + PORT=$((6032 + i * 10)) + CLUSTER_NODES="${CLUSTER_NODES}proxysql:${PORT}," + done +fi export TAP_CLUSTER_NODES=${CLUSTER_NODES%,} # Build and runtime essentials