From e133acf0024dfb6dcd6b0fa977f4c55dc7a2675c Mon Sep 17 00:00:00 2001 From: Lukasz Sojka Date: Fri, 27 Sep 2024 08:09:23 +0200 Subject: [PATCH] fix(update-db-packages): stop only updated nodes When updating multiple nodes db packages, SCT stops all the nodes. This is wrong and causes tests to fail when providing `update_db_packages` param. Fix by removing broken logic and dropping code for nodes stop ordering. fixes: https://github.com/scylladb/scylla-cluster-tests/issues/8551 (cherry picked from commit c140e7be9da091f240d48bb4f9f6532d9c225081) --- sdcm/cluster.py | 24 ++++-------------------- 1 file changed, 4 insertions(+), 20 deletions(-) diff --git a/sdcm/cluster.py b/sdcm/cluster.py index 6f1b321d6f..e41933a760 100644 --- a/sdcm/cluster.py +++ b/sdcm/cluster.py @@ -4236,26 +4236,10 @@ def is_scylla_active(node): start_time = time.time() - if len(node_list) == 1: - # Stop only new nodes - self.run_func_parallel(func=stop_scylla, node_list=node_list) # pylint: disable=no-member - # Then, update packages only on requested node - self.run_func_parallel(func=update_scylla_packages, node_list=node_list) # pylint: disable=no-member - if start_service: - # Start new nodes - self.run_func_parallel(func=start_scylla, node_list=node_list) # pylint: disable=no-member - else: - # First, stop *all* non seed nodes - self.run_func_parallel(func=stop_scylla, node_list=self.non_seed_nodes) # pylint: disable=no-member - # First, stop *all* seed nodes - self.run_func_parallel(func=stop_scylla, node_list=self.seed_nodes) # pylint: disable=no-member - # Then, update packages only on requested nodes - self.run_func_parallel(func=update_scylla_packages, node_list=node_list) # pylint: disable=no-member - if start_service: - # Start all seed nodes - self.run_func_parallel(func=start_scylla, node_list=self.seed_nodes) # pylint: disable=no-member - # Start all non seed nodes - self.run_func_parallel(func=start_scylla, node_list=self.non_seed_nodes) # pylint: disable=no-member + self.run_func_parallel(func=stop_scylla, node_list=node_list) # pylint: disable=no-member + self.run_func_parallel(func=update_scylla_packages, node_list=node_list) # pylint: disable=no-member + if start_service: + self.run_func_parallel(func=start_scylla, node_list=node_list) # pylint: disable=no-member time_elapsed = time.time() - start_time self.log.info('Update DB packages duration -> %s s', int(time_elapsed))