You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@cassandra.apache.org by br...@apache.org on 2021/07/23 16:27:36 UTC

[cassandra-dtest] branch master created (now a2ffd2a)

This is an automated email from the ASF dual-hosted git repository.

brandonwilliams pushed a change to branch master
in repository https://gitbox.apache.org/repos/asf/cassandra-dtest.git.


      at a2ffd2a  Test seeds won't replace

This branch includes the following new commits:

     new a2ffd2a  Test seeds won't replace

The 1 revisions listed above as "new" are entirely new to this
repository and will be described in separate emails.  The revisions
listed as "add" were already present in the repository and have only
been added to this reference.


---------------------------------------------------------------------
To unsubscribe, e-mail: commits-unsubscribe@cassandra.apache.org
For additional commands, e-mail: commits-help@cassandra.apache.org


[cassandra-dtest] 01/01: Test seeds won't replace

Posted by br...@apache.org.
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 <br...@apache.org>
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: commits-unsubscribe@cassandra.apache.org
For additional commands, e-mail: commits-help@cassandra.apache.org