Skip to content

Commit

Permalink
grow dc - ensure NetworkTopologyReplicationStrategy
Browse files Browse the repository at this point in the history
  • Loading branch information
cezarmoise committed Dec 13, 2024
1 parent c279f4e commit 68f1344
Showing 1 changed file with 7 additions and 5 deletions.
12 changes: 7 additions & 5 deletions sdcm/nemesis.py
Original file line number Diff line number Diff line change
Expand Up @@ -4293,6 +4293,13 @@ def disrupt_grow_shrink_datacenter(self):
self.steady_state_latency()
self.has_steady_run = True

# Switch to NetworkTopologyReplicationStrategy using the existing DC
node = self.cluster.data_nodes[0]
system_keyspaces = ["system_distributed", "system_traces"]
if not node.raft.is_consistent_topology_changes_enabled: # auth-v2 is used when consistent topology is enabled
system_keyspaces.insert(0, "system_auth")
self._switch_to_network_replication_strategy(self.cluster.get_test_keyspaces() + system_keyspaces)

# create a new dc
InfoEvent(message='New DC').publish()
nodes_on_new_dc = []
Expand All @@ -4302,11 +4309,6 @@ def disrupt_grow_shrink_datacenter(self):
time.sleep(sleep_time_between_ops)

# reconfigure keyspaces
node = self.cluster.data_nodes[0]
system_keyspaces = ["system_distributed", "system_traces"]
if not node.raft.is_consistent_topology_changes_enabled: # auth-v2 is used when consistent topology is enabled
system_keyspaces.insert(0, "system_auth")

datacenters = list(self.tester.db_cluster.get_nodetool_status().keys())
new_dc_list = [dc for dc in datacenters if dc.endswith("_nemesis_dc")]
assert new_dc_list, "new datacenter was not registered"
Expand Down

0 comments on commit 68f1344

Please sign in to comment.