Fix TAP_CLUSTER_NODES: include primary (6032) as first entry

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.
v3.0-ci260323
Rene Cannao 4 weeks ago
parent a4675096b5
commit 0f12f5d6f1

@ -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

Loading…
Cancel
Save