Skip to content

Commit

Permalink
Node group changes (#547)
Browse files Browse the repository at this point in the history
Signed-off-by: Jayesh-Kumar3 <[email protected]>
Co-authored-by: Jayesh-Kumar3 <[email protected]>
  • Loading branch information
jayeshh123 and Jayesh-Kumar3 authored Jun 25, 2024
1 parent 069cdb2 commit 7df73fe
Showing 1 changed file with 13 additions and 3 deletions.
16 changes: 13 additions & 3 deletions resources/common/scripts/prepare_scale_inv_ini.py
Original file line number Diff line number Diff line change
Expand Up @@ -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,
Expand All @@ -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':
Expand Down

0 comments on commit 7df73fe

Please sign in to comment.