Skip to content
Permalink
Browse files
Add test that seeds won't replace.
Patch by brandonwilliams, reviewed by edimitrova for CASSANDRA-14463
  • Loading branch information
driftx committed Sep 22, 2021
1 parent f82f102 commit 10dd53fcaceabec556f43f67d90dfaf75f2dbbfc
Showing 1 changed file with 25 additions and 0 deletions.
@@ -359,6 +359,31 @@ def test_fail_without_replace(self):
node3.watch_log_for('Use cassandra.replace_address if you want to replace this node', from_mark=mark, timeout=20)
mark = node3.mark_log()

@since('3.0')
def test_fail_when_seed(self):
"""
When a node is a seed replace should fail
@jira_ticket CASSANDRA-14463
"""
self.fixture_dtest_setup.ignore_log_patterns = list(self.fixture_dtest_setup.ignore_log_patterns) + [
r'Exception encountered during startup']

self._setup(n=3)
node1, node2, node3 = self.cluster.nodelist()
self.cluster.seeds.append(node3.address())

node3.stop(gently=False)
mark = node3.mark_log()

for d in chain([os.path.join(node3.get_path(), "commitlogs")],
[os.path.join(node3.get_path(), "saved_caches")],
node3.data_directories()):
if os.path.exists(d):
rmtree(d)

node3.start(jvm_args=["-Dcassandra.replace_address=" + node3.address()], wait_other_notice=False)
node3.watch_log_for('Replacing a node without bootstrapping risks invalidating consistency guarantees', from_mark=mark, timeout=20)

@since('3.6')
def test_unsafe_replace(self):
"""

0 comments on commit 10dd53f

Please sign in to comment.