From a78aa92142c1549e1802150550e9ee12e7d83b73 Mon Sep 17 00:00:00 2001 From: Jayesh-Kumar3 Date: Fri, 21 Jun 2024 12:21:12 +0530 Subject: [PATCH] Node group changes Signed-off-by: Jayesh-Kumar3 --- .../common/scripts/prepare_scale_inv_ini.py | 16 +++++++++++++--- 1 file changed, 13 insertions(+), 3 deletions(-) diff --git a/resources/common/scripts/prepare_scale_inv_ini.py b/resources/common/scripts/prepare_scale_inv_ini.py index c1094e2d..1752f1e3 100755 --- a/resources/common/scripts/prepare_scale_inv_ini.py +++ b/resources/common/scripts/prepare_scale_inv_ini.py @@ -347,13 +347,23 @@ def initialize_node_details(az_count, cls_type, compute_cluster_instance_names, start_quorum_assign = quorum_count - 1 for each_ip in storage_cluster_instance_names: each_name = each_ip.split('.')[0] - scale_protocol_node = each_ip in protocol_cluster_instance_names + is_protocol = each_ip in protocol_cluster_instance_names is_nsd = each_name in storage_nsd_server_instance_names + if is_nsd: + if is_protocol: + nodeclass = "storageprotocolnodegrp" + else: + nodeclass = "storagenodegrp" + else: + if is_protocol: + nodeclass = "protocolnodegrp" + else: + nodeclass = "mgmtnodegrp" if storage_cluster_instance_names.index(each_ip) < (start_quorum_assign): node = {'ip_addr': each_ip, 'is_quorum': True, 'is_manager': True, 'is_gui': False, 'is_collector': False, 'is_nsd': is_nsd, 'is_admin': True, 'user': user, 'key_file': key_file, - 'class': "storagenodegrp", 'daemon_nodename': each_name, 'scale_protocol_node': scale_protocol_node} + 'class': nodeclass, 'daemon_nodename': each_name, 'scale_protocol_node': is_protocol} # Tie-breaker node defination elif storage_cluster_instance_names.index(each_ip) == total_storage_node - 1: node = {'ip_addr': each_ip, 'is_quorum': True, 'is_manager': False, @@ -374,7 +384,7 @@ def initialize_node_details(az_count, cls_type, compute_cluster_instance_names, node = {'ip_addr': each_ip, 'is_quorum': False, 'is_manager': is_nsd, 'is_gui': False, 'is_collector': False, 'is_nsd': is_nsd, 'is_admin': is_nsd, 'user': user, 'key_file': key_file, - 'class': "storagenodegrp", 'daemon_nodename': each_name, 'scale_protocol_node': scale_protocol_node} + 'class': nodeclass, 'daemon_nodename': each_name, 'scale_protocol_node': is_protocol} node_details.append(get_host_format(node)) elif cls_type == 'combined':