This is an automated email from the ASF dual-hosted git repository.
smiklosovic pushed a commit to branch trunk
in repository https://gitbox.apache.org/repos/asf/cassandra-dtest.git
The following commit(s) were added to refs/heads/trunk by this push:
new 24e6d2b5 Revert "dtest for setting hostId upon node startup"
24e6d2b5 is described below
commit 24e6d2b59897971a110b69c634cfb6e6c62cd2e9
Author: Stefan Miklosovic <[email protected]>
AuthorDate: Wed Apr 27 21:08:53 2022 +0200
Revert "dtest for setting hostId upon node startup"
This reverts commit 148f57ef8051adfa15d1fefff5edff2709f0c75b.
patch by Stefan Miklosovic; reviewed by Brandon Williams and Sam
Tunnicliffe for CASSANDRA-14582
---
bootstrap_test.py | 81 -------------------------------------------------------
1 file changed, 81 deletions(-)
diff --git a/bootstrap_test.py b/bootstrap_test.py
index 06190e97..51da884e 100644
--- a/bootstrap_test.py
+++ b/bootstrap_test.py
@@ -7,7 +7,6 @@ import threading
import time
import logging
import signal
-import uuid
from cassandra import ConsistencyLevel
from cassandra.concurrent import execute_concurrent_with_args
@@ -1020,86 +1019,6 @@ class BootstrapTester(Tester):
assert_bootstrap_state(self, node3, 'COMPLETED', user='cassandra',
password='cassandra')
node3.wait_for_binary_interface()
- @since('4.1')
- def test_invalid_host_id(self):
- """
- @jira_ticket CASSANDRA-14582
- Test that node fails to bootstrap if host id is invalid
- """
- cluster = self.cluster
-
cluster.set_environment_variable('CASSANDRA_TOKEN_PREGENERATION_DISABLED',
'True')
- cluster.populate(1)
- cluster.start()
-
- node2 = new_node(cluster)
-
- try:
-
node2.start(jvm_args=["-Dcassandra.host_id_first_boot=invalid-host-id"],
wait_other_notice=False, wait_for_binary_proto=True)
- pytest.fail('Node should fail to bootstrap because host id set was
invalid')
- except NodeError:
- pass # node does not start as expected
-
- @since('4.1')
- def test_host_id_override(self):
- """
- @jira_ticket CASSANDRA-14582
- Test that node persists host id
- """
- cluster = self.cluster
-
cluster.set_environment_variable('CASSANDRA_TOKEN_PREGENERATION_DISABLED',
'True')
- cluster.populate(1)
- cluster.start()
-
- host_id = "06fc931f-33b5-4e22-0001-000000000001"
-
- node1 = cluster.nodes['node1']
-
- node2 = new_node(cluster)
- node2.start(wait_for_binary_proto=True, wait_other_notice=True,
jvm_args=["-Dcassandra.host_id_first_boot={}".format(host_id)])
-
- address2 = "'{}'".format(node2.address())
-
- # 1. wait for host_id setup
- node2.watch_log_for(host_id)
-
- # 2. check host_id in local table
- session2 = self.patient_exclusive_cql_connection(node2)
- assert_one(session2, "SELECT host_id FROM system.local",
[uuid.UUID(host_id)])
-
- # 3. check host_id in other node's table
- session1 = self.patient_exclusive_cql_connection(node1)
- assert_one(session1, "SELECT host_id FROM system.peers_v2 WHERE peer =
{}".format(address2), [uuid.UUID(host_id)])
-
- # restart node and repeat
- node2.stop()
- node2.start(wait_for_binary_proto=True, wait_other_notice=True)
-
- # 1. wait for host_id setup
- node2.watch_log_for(host_id)
-
- # 2. check host_id in local table
- session2 = self.patient_exclusive_cql_connection(node2)
- assert_one(session2, "SELECT host_id FROM system.local",
[uuid.UUID(host_id)])
-
- # 3. check host_id in other node's table
- session1 = self.patient_exclusive_cql_connection(node1)
- assert_one(session1, "SELECT host_id FROM system.peers_v2 WHERE peer =
{}".format(address2), [uuid.UUID(host_id)])
-
- # restart node with another host_id and repeat
- node2.stop()
- node2.start(wait_for_binary_proto=True, wait_other_notice=True,
jvm_args=["-Dcassandra.host_id_first_boot=setting-new-host-id-first-boot"])
-
- # 1. wait for host_id setup
- node2.watch_log_for(host_id)
-
- # 2. check host_id in local table
- session2 = self.patient_exclusive_cql_connection(node2)
- assert_one(session2, "SELECT host_id FROM system.local",
[uuid.UUID(host_id)])
-
- # 3. check host_id in other node's table
- session1 = self.patient_exclusive_cql_connection(node1)
- assert_one(session1, "SELECT host_id FROM system.peers_v2 WHERE peer =
{}".format(address2), [uuid.UUID(host_id)])
-
class TestBootstrap(BootstrapTester):
"""
---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]