Skip to content

Commit c52db0b

Browse files
author
Himani Anil Deshpande
committed
Adding it as condition
1 parent 90ec5ea commit c52db0b

File tree

1 file changed

+7
-6
lines changed
  • cookbooks/aws-parallelcluster-slurm/libraries

1 file changed

+7
-6
lines changed

cookbooks/aws-parallelcluster-slurm/libraries/helpers.rb

Lines changed: 7 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -213,15 +213,16 @@ def check_for_protected_mode(fleet_status_command) # rubocop:disable Lint/Nested
213213
# sinfo -h -o '%N %t'
214214
# queue-0-dy-compute-resource-g4dn-0-[1-10],queue-1-dy-compute-resource-g4dn-1-[1-10] idle~
215215
# queue-2-dy-compute-resource-g4dn-2-[1-10],queue-3-dy-compute-resource-g4dn-3-[1-10] idle
216-
until shell_out!("/bin/bash -c /usr/local/bin/is_fleet_ready.sh").stdout.strip.empty?
217-
check_for_protected_mode(fleet_status_command)
216+
if get_static_node_count.to_i > 0
217+
until shell_out!("/bin/bash -c /usr/local/bin/is_fleet_ready.sh").stdout.strip.empty?
218+
check_for_protected_mode(fleet_status_command) #TODO Separate check for dynamic Nodes during dfsmv2
218219

219-
Chef::Log.info("Waiting for static fleet capacity provisioning")
220-
sleep(15)
220+
Chef::Log.info("Waiting for static fleet capacity provisioning")
221+
sleep(15)
222+
end
223+
Chef::Log.info("Static fleet capacity is ready")
221224
end
222-
Chef::Log.info("Static fleet capacity is ready")
223225
end
224-
only_if { get_static_node_count.to_i > 0 }
225226
end
226227
end
227228

0 commit comments

Comments
 (0)