From e24f159753ade8522359d2ae9c34d1e24878f33b 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 --- sdcm/nemesis.py | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/sdcm/nemesis.py b/sdcm/nemesis.py index aacb79bad8..6b4f5bf34e 100644 --- a/sdcm/nemesis.py +++ b/sdcm/nemesis.py @@ -3687,7 +3687,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}")