Skip to content

Commit

Permalink
fix(nodes list in email): not print nodes list in the email if more t…
Browse files Browse the repository at this point in the history
…hen 20 nodes

There are scale tests with a lot of nodes. It will be so big list of nodes to print it in the
email. Don't print nodes info if test cluster has more then 20 nodes (live and terminated)
  • Loading branch information
juliayakovlev authored and Bentsi committed Mar 30, 2021
1 parent f56709e commit 522cf6b
Showing 1 changed file with 6 additions and 1 deletion.
7 changes: 6 additions & 1 deletion sdcm/tester.py
Original file line number Diff line number Diff line change
Expand Up @@ -2750,7 +2750,12 @@ def get_email_data(self): # pylint: disable=no-self-use
return {}

def all_nodes_scylla_shards(self):
all_nodes_shards = defaultdict(list)
all_nodes_shards = defaultdict(list, {'live_nodes': [], 'dead_nodes': []})

# There are scale tests with a lot of nodes. It will be so big list of nodes to print it in the email
if len(self.db_cluster.dead_nodes_list) + len(self.db_cluster.nodes) > 20:
return all_nodes_shards

for node in self.db_cluster.nodes:
ipv6 = node.ipv6_ip_address if node.ip_address == node.ipv6_ip_address else ''
all_nodes_shards['live_nodes'].append({'name': node.name,
Expand Down

0 comments on commit 522cf6b

Please sign in to comment.