Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[Backport 2024.1] fix(update-db-packages): stop only updated nodes #8873

Merged
merged 1 commit into from
Sep 29, 2024
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
24 changes: 4 additions & 20 deletions sdcm/cluster.py
Original file line number Diff line number Diff line change
Expand Up @@ -4121,26 +4121,10 @@ def start_scylla(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.debug('Update DB packages duration -> %s s', int(time_elapsed))
Expand Down
Loading