Skip to content

Commit

Permalink
tests: validate if node with old node is is reported as offline
Browse files Browse the repository at this point in the history
The node folder deletion test checks if a node joins the cluster with
the new node id after its data folder was deleted. Introduced a new
validation checking if in this case the node with the old node_id
is reported as offline

Signed-off-by: Michał Maślanka <michal@redpanda.com>
  • Loading branch information
mmaslankaprv committed Aug 9, 2024
1 parent 90eafa8 commit 6a8f390
Showing 1 changed file with 15 additions and 0 deletions.
15 changes: 15 additions & 0 deletions tests/rptest/tests/node_folder_deletion_test.py
Original file line number Diff line number Diff line change
Expand Up @@ -94,7 +94,22 @@ def test_deleting_node_folder(self):
wait_until(lambda: producer.produce_status.acked > 200000,
timeout_sec=120,
backoff_sec=0.5)

admin = Admin(self.redpanda)

# validate that the node with deleted folder is recognized as offline
def removed_node_is_reported_offline():
cluster_health = admin.get_cluster_health_overview()
return id in cluster_health['nodes_down']

wait_until(
removed_node_is_reported_offline,
timeout_sec=20,
backoff_sec=0.5,
err_msg=
f"Node {id} is expected to be marked as offline as it was replaced by new node"
)

# decommission a node that has been cleared
admin.decommission_broker(id)
waiter = NodeDecommissionWaiter(self.redpanda,
Expand Down

0 comments on commit 6a8f390

Please sign in to comment.