File tree Expand file tree Collapse file tree 1 file changed +6
-3
lines changed
cookbooks/aws-parallelcluster-slurm/libraries Expand file tree Collapse file tree 1 file changed +6
-3
lines changed Original file line number Diff line number Diff line change @@ -185,8 +185,8 @@ def get_static_node_count
185185 slurm_queues_section = cluster_config . dig ( "Scheduling" , "SlurmQueues" )
186186 if slurm_queues_section
187187 slurm_queues_section . each do |queue_config |
188- queue_config . dig ( 'ComputeResources' ) . each do |compute_resource_config |
189- total_min_count += compute_resource_config . dig ( 'MinCount' ) . to_i
188+ queue_config [ 'ComputeResources' ] . each do |compute_resource_config |
189+ total_min_count += compute_resource_config [ 'MinCount' ] . to_i
190190 end
191191 end
192192 end
@@ -219,11 +219,14 @@ def check_for_protected_mode(fleet_status_command) # rubocop:disable Lint/Nested
219219 "/usr/local/bin/get-compute-fleet-status.sh"
220220 )
221221
222+ total_static_node_count = get_static_node_count
223+ Chef ::Log . info ( "Count of cluster static nodes is #{ total_static_node_count } " )
224+
222225 # Example output for sinfo
223226 # sinfo -h -o '%N %t'
224227 # queue-0-dy-compute-resource-g4dn-0-[1-10],queue-1-dy-compute-resource-g4dn-1-[1-10] idle~
225228 # queue-2-dy-compute-resource-g4dn-2-[1-10],queue-3-dy-compute-resource-g4dn-3-[1-10] idle
226- until shell_out! ( "/bin/bash -c /usr/local/bin/is_fleet_ready.sh #{ get_static_node_count } " ) . stdout . strip . empty?
229+ until shell_out! ( "/bin/bash /usr/local/bin/is_fleet_ready.sh #{ total_static_node_count } " ) . stdout . strip . empty?
227230 check_for_protected_mode ( fleet_status_command )
228231
229232 Chef ::Log . info ( "Waiting for static fleet capacity provisioning" )
You can’t perform that action at this time.
0 commit comments