This is an automated email from the ASF dual-hosted git repository. brandonwilliams pushed a commit to branch master in repository https://gitbox.apache.org/repos/asf/cassandra-dtest.git
commit a2ffd2aa8a528d0ad3cf572d406f6b1d92b80b51 Author: Brandon Williams <[email protected]> AuthorDate: Thu Jul 22 11:30:11 2021 -0500 Test seeds won't replace Patch by brandonwilliams; reviewed by edimitrova for CASSANDRA-14463 --- replace_address_test.py | 26 ++++++++++++++++++++++++++ 1 file changed, 26 insertions(+) diff --git a/replace_address_test.py b/replace_address_test.py index 18a94ae..771c8fc 100644 --- a/replace_address_test.py +++ b/replace_address_test.py @@ -362,6 +362,32 @@ class TestReplaceAddress(BaseReplaceAddressTest): 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() + + # completely delete the data, commitlog, and saved caches + 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): """ --------------------------------------------------------------------- To unsubscribe, e-mail: [email protected] For additional commands, e-mail: [email protected]
