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

Node group changes #547

Merged
merged 1 commit into from
Jun 25, 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
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