Skip to content
Draft
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
11 changes: 8 additions & 3 deletions tests/integration/standard/test_client_routes.py
Original file line number Diff line number Diff line change
Expand Up @@ -1178,7 +1178,7 @@ def test_should_survive_full_node_replacement_through_nlb(self):
ccm_cluster = get_cluster()

for node_id in new_node_ids:
self._bootstrap_node(ccm_cluster, node_id)
self._bootstrap_node(ccm_cluster, node_id, data_center='dc1')

expected_total = len(original_node_ids) + len(new_node_ids)
self._wait_for_condition(
Expand Down Expand Up @@ -1283,7 +1283,7 @@ def _query_succeeds(self, session):
except Exception:
return False

def _bootstrap_node(self, ccm_cluster, node_id):
def _bootstrap_node(self, ccm_cluster, node_id, data_center=None, rack=None):
node_type = type(next(iter(ccm_cluster.nodes.values())))
ip = "127.0.0.%d" % node_id
node_instance = node_type(
Expand All @@ -1297,7 +1297,12 @@ def _bootstrap_node(self, ccm_cluster, node_id):
remote_debug_port=0,
initial_token=None,
)
ccm_cluster.add(node_instance, is_seed=False)
# CCM requires explicit data_center/rack when adding a node so that
# cassandra-rackdc.properties is written correctly. Without this the
# snitch fails to parse the empty properties file and the node crashes
# on startup.
ccm_cluster.add(node_instance, is_seed=False,
data_center=data_center, 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)
Expand Down
Loading