Skip to content

Commit

Permalink
fix(disrupt_remove_node_then_add_node): call nodetool removenode as…
Browse files Browse the repository at this point in the history
… 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 ecc2c7e)
  • Loading branch information
fruch committed Dec 10, 2024
1 parent 189e0ab commit 9630f55
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion sdcm/nemesis.py
Original file line number Diff line number Diff line change
Expand Up @@ -3635,7 +3635,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}")

Expand Down

0 comments on commit 9630f55

Please sign in to comment.