From aab7e793eeec2b4e918d058adb7bdefefeb969ce Mon Sep 17 00:00:00 2001 From: Yaniv Michael Kaul Date: Sat, 28 Mar 2026 15:26:56 +0300 Subject: [PATCH] tests: fix NLB replacement test bootstrap crash due to missing rackdc properties The _bootstrap_node() method in TestFullNodeReplacementThroughNlb calls ccm_cluster.add() without passing data_center or rack. CCM does not infer these from existing nodes, so the new node's cassandra-rackdc.properties file is left with only template comments. Scylla's GossipingPropertyFileSnitch fails to parse the empty file and crashes on startup with 'locator::bad_property_file_error'. Fix by reading data_center/rack from an existing cluster node and passing them explicitly to ccm_cluster.add(). This test was added in PR #706 with a @skip_scylla_version_lt(2026.1.0) decorator and CI runs Scylla 2025.2, so the bug was never caught. --- tests/integration/standard/test_client_routes.py | 9 ++++++++- 1 file changed, 8 insertions(+), 1 deletion(-) diff --git a/tests/integration/standard/test_client_routes.py b/tests/integration/standard/test_client_routes.py index a8a3c30f2c..a6adfd2067 100644 --- a/tests/integration/standard/test_client_routes.py +++ b/tests/integration/standard/test_client_routes.py @@ -1297,7 +1297,14 @@ def _bootstrap_node(self, ccm_cluster, node_id): remote_debug_port=0, initial_token=None, ) - ccm_cluster.add(node_instance, is_seed=False) + # CCM does not infer data_center/rack when adding a node, so + # we must pass them explicitly to ensure cassandra-rackdc.properties + # is written correctly. Without this the snitch fails to parse the + # empty properties file and the node crashes on startup. + existing = next(iter(ccm_cluster.nodes.values())) + dc = existing.data_center or 'dc1' + rack = existing.rack or 'RAC1' + ccm_cluster.add(node_instance, is_seed=False, data_center=dc, rack=rack) node_instance.start(wait_for_binary_proto=True, wait_other_notice=True) wait_for_node_socket(node_instance, 120) log.info("Node %d bootstrapped successfully", node_id)