def node_setup(self, node, verbose=False, timeout=3600): endpoint_snitch = self.params.get('endpoint_snitch') seed_address = ','.join(self.seed_nodes_ips) node.wait_ssh_up(verbose=verbose) if not node.is_scylla_installed(): raise Exception(f"There is no pre-installed ScyllaDB") self.check_aio_max_nr(node) if cluster.Setup.BACKTRACE_DECODING: node.install_scylla_debuginfo() self.node_config_setup(node, seed_address, endpoint_snitch) node.stop_scylla_server(verify_down=False) node.remoter.run( 'sudo rm -Rf /var/lib/scylla/data/*' ) # Clear data folder to drop wrong cluster name data. node.start_scylla_server(verify_up=False) node.wait_db_up(verbose=verbose, timeout=timeout) nodes_status = node.get_nodes_status() check_nodes_status(nodes_status=nodes_status, current_node=node) self.clean_replacement_node_ip(node)
def node_setup(self, node, verbose=False, timeout=3600): endpoint_snitch = self.params.get('endpoint_snitch') seed_address = ','.join(self.seed_nodes_ips) node.wait_ssh_up(verbose=verbose) node.is_scylla_installed(raise_if_not_installed=True) self.check_aio_max_nr(node) if self.test_config.BACKTRACE_DECODING: node.install_scylla_debuginfo() self.node_config_setup(node, seed_address, endpoint_snitch) node.stop_scylla_server(verify_down=False) node.remoter.sudo( 'rm -Rf /var/lib/scylla/data/*' ) # Clear data folder to drop wrong cluster name data. node.start_scylla_server(verify_up=False) node.wait_db_up(verbose=verbose, timeout=timeout) for event in check_nodes_status( nodes_status=node.get_nodes_status(), current_node=node, removed_nodes_list=self.dead_nodes_ip_address_list): event.publish() self.clean_replacement_node_ip(node)
def test_check_nodes_status_removed(self): event = next(check_nodes_status(NODES_STATUS, Node, ["127.0.0.2", ]), None) self.assertIsNotNone(event) self.assertEqual(event.type, "NodeStatus") self.assertEqual(event.severity, Severity.ERROR) self.assertEqual(event.node, "node-0") self.assertEqual(event.message, "") self.assertNotEqual(event.error, "")
def test_check_nodes_status_no_removed(self): event = next(check_nodes_status(NODES_STATUS, node1), None) self.assertIsNotNone(event) self.assertEqual(event.type, "NodeStatus") self.assertEqual(event.severity, Severity.CRITICAL) self.assertEqual(event.node, "node-0") self.assertEqual(event.message, "") self.assertNotEqual(event.error, "")