test_decommissioned_node_cant_rejoin | Failure | ccmlib.node.TimeoutError: timed out and did not find log entry: This node was decommissioned and will not rejoin the ring
self = <topology_test.TestTopology object at 0x7fe3beec9100>
@since('3.0')
def test_decommissioned_node_cant_rejoin(self):
"""
@jira_ticket CASSANDRA-8801
Test that a decommissioned node can't rejoin the cluster by:
- creating a cluster,
- decommissioning a node, and
- asserting that the "decommissioned node won't rejoin" error is in the
logs for that node and
- asserting that the node is not running.
"""
rejoin_err = 'This node was decommissioned and will not rejoin the ring'
self.fixture_dtest_setup.ignore_log_patterns = list(self.fixture_dtest_setup.ignore_log_patterns) + [
rejoin_err]
self.cluster.populate(3).start()
node1, node2, node3 = self.cluster.nodelist()
logger.debug('decommissioning...')
node3.decommission(force=self.cluster.version() >= '4.0')
logger.debug('stopping...')
node3.stop()
logger.debug('attempting restart...')
node3.start(wait_other_notice=False)
timedout = False
try:
# usually takes 3 seconds, so give it a generous 15
node3.watch_log_for(rejoin_err, timeout=15)
except TimeoutError:
# TimeoutError is not very helpful to the reader of the test output;
# let that pass and move on to string assertion below
timedout = True
n3errors = node3.grep_log_for_errors()
if len(n3errors) == 0 and timedout:
> raise TimeoutError("timed out and did not find log entry: " + rejoin_err)
E ccmlib.node.TimeoutError: timed out and did not find log entry: This node was decommissioned and will not rejoin the ring
topology_test.py:425: TimeoutError | 126.582 |