From c1f0c1ada8b225f038779a41fbb861aa04451f29 Mon Sep 17 00:00:00 2001 From: Israel Fruchter Date: Tue, 10 Dec 2024 01:48:12 +0200 Subject: [PATCH] fix(disrupt_remove_node_then_add_node): call `nodetool removenode` as long_running since this command can take long, and ssh connection might get interuppted we should use the `long_running=True` option, so the command would be exceuted on the node, and retrive the output when it finish. Fixes: #9494 (cherry picked from commit ecc2c7e64206a1c4a465873c5c38caa66e2dbde4) --- sdcm/nemesis.py | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/sdcm/nemesis.py b/sdcm/nemesis.py index ae94af5cb6..1215ed7d1e 100644 --- a/sdcm/nemesis.py +++ b/sdcm/nemesis.py @@ -3498,7 +3498,8 @@ def remove_node(): self.log.info("Running removenode command on {}, Removing node with the following host_id: {}" .format(rnd_node.ip_address, host_id)) with adaptive_timeout(Operations.REMOVE_NODE, rnd_node, timeout=HOUR_IN_SEC * 48): - res = rnd_node.run_nodetool("removenode {}".format(host_id), ignore_status=True, verbose=True) + res = rnd_node.run_nodetool("removenode {}".format( + host_id), ignore_status=True, verbose=True, long_running=True) if res.failed and re.match(removenode_reject_msg, res.stdout + res.stderr): raise Exception(f"Removenode was rejected {res.stdout}\n{res.stderr}")