Skip to content

Commit 22234f5

Browse files
author
Himani Anil Deshpande
committed
[SlurmTopo] Do not support Slurm Topology for AL2
1 parent 66c11b9 commit 22234f5

File tree

3 files changed

+23
-16
lines changed

3 files changed

+23
-16
lines changed

cookbooks/aws-parallelcluster-slurm/recipes/config/config_head_node.rb

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -60,6 +60,7 @@
6060
owner 'root'
6161
group 'root'
6262
mode '0644'
63+
not_if { platform?('amazon') && node['platform_version'] == "2" }
6364
end
6465

6566
unless on_docker?

cookbooks/aws-parallelcluster-slurm/recipes/update/update_head_node.rb

Lines changed: 20 additions & 15 deletions
Original file line numberDiff line numberDiff line change
@@ -151,22 +151,27 @@ def update_nodes_in_queue(strategy, queues)
151151
end
152152
end
153153

154-
# Update slurm_parallelcluster_topology to add/remove Block Topology plugin
155-
template "#{node['cluster']['slurm']['install_dir']}/etc/slurm_parallelcluster_topology.conf" do
156-
source 'slurm/slurm_parallelcluster_topology.conf.erb'
157-
owner 'root'
158-
group 'root'
159-
mode '0644'
160-
end
154+
ruby_block "Update slurm topology" do
155+
block do
156+
# Update slurm_parallelcluster_topology to add/remove Block Topology plugin
157+
template "#{node['cluster']['slurm']['install_dir']}/etc/slurm_parallelcluster_topology.conf" do
158+
source 'slurm/slurm_parallelcluster_topology.conf.erb'
159+
owner 'root'
160+
group 'root'
161+
mode '0644'
162+
end
161163

162-
# Generate Slurm topology.conf file
163-
execute "update_topology_config" do
164-
command "#{cookbook_virtualenv_path}/bin/python #{node['cluster']['scripts_dir']}/slurm/pcluster_topology_generator.py"\
165-
" --output-file #{node['cluster']['slurm']['install_dir']}/etc/topology.conf"\
166-
" --block-sizes #{node['cluster']['p6egb200_block_sizes']}"\
167-
" --input-file #{node['cluster']['cluster_config_path']}"
168-
not_if { ::File.exist?(node['cluster']['previous_cluster_config_path']) && !are_queues_updated? && node['cluster']['p6egb200_block_sizes'].nil? || (platform?('amazon') && node['platform_version'] == "2") }
169-
#TODO: Need to remove topology.conf if CB is removed
164+
# Update Slurm topology.conf file
165+
execute "update or cleanup topology.conf" do
166+
command "#{cookbook_virtualenv_path}/bin/python #{node['cluster']['scripts_dir']}/slurm/pcluster_topology_generator.py"\
167+
" --output-file #{node['cluster']['slurm']['install_dir']}/etc/topology.conf"\
168+
" --block-sizes #{node['cluster']['p6egb200_block_sizes']}"\
169+
" --input-file #{node['cluster']['cluster_config_path']}"
170+
not_if { ::File.exist?(node['cluster']['previous_cluster_config_path']) && !are_queues_updated? && node['cluster']['p6egb200_block_sizes'].nil? }
171+
#TODO: Need to remove topology.conf if CB is removed
172+
end
173+
end
174+
not_if { platform?('amazon') && node['platform_version'] == "2" }
170175
end
171176

172177
execute "generate_pcluster_slurm_configs" do

cookbooks/aws-parallelcluster-slurm/templates/default/slurm/slurm.conf.erb

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -84,8 +84,9 @@ include slurm_parallelcluster.conf
8484
# WARNING!!! The custom_slurm_settings_include_file_slurm.conf file included below can be updated by the pcluster process.
8585
# Please do not edit it.
8686
include pcluster/custom_slurm_settings_include_file_slurm.conf
87-
87+
<% unless platform?('amazon') && node['platform_version'] == "2" -%>
8888
#
8989
# WARNING!!! The slurm_parallelcluster_topology.conf file included below can be updated by the pcluster process.
9090
# Please do not edit it.
9191
include slurm_parallelcluster_topology.conf
92+
<% end -%>

0 commit comments

Comments
 (0)