@@ -5522,18 +5522,19 @@ def drop_keyspace(node):
5522
5522
simulate_node_unavailability = node_operations .block_scylla_ports if use_iptables else node_operations .pause_scylla_with_sigstop
5523
5523
with self .run_nemesis (node_list = self .cluster .nodes ,
5524
5524
nemesis_label = f"Running { simulate_node_unavailability .__name__ } " ) as working_node , ExitStack () as stack :
5525
+ stack .callback (drop_keyspace , node = working_node )
5525
5526
target_host_id = self .target_node .host_id
5526
5527
stack .callback (self ._remove_node_add_node , verification_node = working_node , node_to_remove = self .target_node ,
5527
5528
remove_node_host_id = target_host_id )
5528
5529
5529
5530
self .tester .create_keyspace (keyspace_name , replication_factor = 3 )
5530
5531
self .tester .create_table (name = table_name , keyspace_name = keyspace_name , key_type = "bigint" ,
5531
5532
columns = {"name" : "text" })
5532
- stack .callback (drop_keyspace , node = working_node )
5533
5533
5534
5534
with simulate_node_unavailability (self .target_node ):
5535
- # target node stopped by Contextmanger. Wait while its status will be updated
5536
- wait_for (node_operations .is_node_seen_as_down , timeout = 600 , throw_exc = True ,
5535
+ # target node stopped by Contextmanger. Wait while its status will be updated.
5536
+ # with tablets and multidc it could take more time.
5537
+ wait_for (node_operations .is_node_seen_as_down , step = 10 , timeout = 3600 , throw_exc = True ,
5537
5538
down_node = self .target_node , verification_node = working_node , text = f"Wait other nodes see { self .target_node .name } as DOWN..." )
5538
5539
self .log .debug ("Remove node %s : hostid: %s with blocked scylla from cluster" ,
5539
5540
self .target_node .name , target_host_id )
@@ -5560,12 +5561,11 @@ def drop_keyspace(node):
5560
5561
5561
5562
with self .cluster .cql_connection_patient (working_node ) as session :
5562
5563
LOGGER .debug ("Check keyspace %s.%s is empty" , keyspace_name , table_name )
5563
- result = list (session .execute (f"SELECT * from { keyspace_name } .{ table_name } " ))
5564
+ result = list (session .execute (
5565
+ f"SELECT * from { keyspace_name } .{ table_name } " , consistency_level = ConsistencyLevel .QUORUM ))
5564
5566
LOGGER .debug ("Query result %s" , result )
5565
5567
assert not result , f"New rows were added from banned node, { result } "
5566
5568
5567
- drop_keyspace (working_node )
5568
-
5569
5569
5570
5570
def disrupt_method_wrapper (method , is_exclusive = False ): # pylint: disable=too-many-statements # noqa: PLR0915
5571
5571
"""
0 commit comments