File tree Expand file tree Collapse file tree 3 files changed +15
-14
lines changed
cookbooks/aws-parallelcluster-platform
resources/nvidia_imex/partial Expand file tree Collapse file tree 3 files changed +15
-14
lines changed Original file line number Diff line number Diff line change 3939 owner 'root'
4040 group 'root'
4141 mode '0755'
42- action :create
43- not_if { file_exists_and_cluster_update? ( nvidia_imex_nodes_conf_file ) }
42+ action :create_if_missing
4443 end
4544
4645 template nvidia_imex_main_conf_file do
4746 source 'nvidia-imex/nvidia-imex-config.erb'
4847 owner 'root'
4948 group 'root'
5049 mode '0755'
51- action :create
52- not_if { file_exists_and_cluster_update? ( nvidia_imex_main_conf_file ) }
50+ action :create_if_missing
5351 variables ( imex_nodes_config_file_path : nvidia_imex_nodes_conf_file )
5452 end
5553
@@ -93,10 +91,6 @@ def nvidia_enabled_or_installed?
9391 nvidia_enabled? || nvidia_installed?
9492end
9593
96- def file_exists_and_cluster_update? ( file_path )
97- ::File . exist? ( file_path ) && !are_queues_updated?
98- end
99-
10094def nvidia_imex_main_conf_file
10195 "#{ node [ 'cluster' ] [ 'nvidia' ] [ 'imex' ] [ 'shared_dir' ] } /config_#{ node [ 'cluster' ] [ 'launch_template_id' ] } .cfg"
10296end
Original file line number Diff line number Diff line change @@ -336,12 +336,12 @@ def self.configure(chef_run)
336336
337337 if ( platform == 'amazon' && version == '2' ) || %w( HeadNode LoginNode ) . include? ( node_type )
338338 it 'does not configure nvidia-imex' do
339- is_expected . not_to create_template ( "#{ nvidia_imex_shared_dir } /nodes_config_#{ launch_template_id } .cfg" )
339+ is_expected . not_to create_if_missing_template ( "#{ nvidia_imex_shared_dir } /nodes_config_#{ launch_template_id } .cfg" )
340340 . with ( source : 'nvidia-imex/nvidia-imex-nodes.erb' )
341341 . with ( user : 'root' )
342342 . with ( group : 'root' )
343343 . with ( mode : '0755' )
344- is_expected . not_to create_template ( "#{ nvidia_imex_shared_dir } /config_#{ launch_template_id } .cfg" )
344+ is_expected . not_to create_if_missing_template ( "#{ nvidia_imex_shared_dir } /config_#{ launch_template_id } .cfg" )
345345 . with ( source : 'nvidia-imex/nvidia-imex-config.erb' )
346346 . with ( user : 'root' )
347347 . with ( group : 'root' )
@@ -357,12 +357,12 @@ def self.configure(chef_run)
357357 end
358358 else
359359 it 'it starts nvidia-imex service' do
360- is_expected . to create_template ( "#{ nvidia_imex_shared_dir } /nodes_config_#{ launch_template_id } .cfg" )
360+ is_expected . to create_if_missing_template ( "#{ nvidia_imex_shared_dir } /nodes_config_#{ launch_template_id } .cfg" )
361361 . with ( source : 'nvidia-imex/nvidia-imex-nodes.erb' )
362362 . with ( user : 'root' )
363363 . with ( group : 'root' )
364364 . with ( mode : '0755' )
365- is_expected . to create_template ( "#{ nvidia_imex_shared_dir } /config_#{ launch_template_id } .cfg" )
365+ is_expected . to create_if_missing_template ( "#{ nvidia_imex_shared_dir } /config_#{ launch_template_id } .cfg" )
366366 . with ( source : 'nvidia-imex/nvidia-imex-config.erb' )
367367 . with ( user : 'root' )
368368 . with ( group : 'root' )
Original file line number Diff line number Diff line change 11## Please replace below fake IP's with correct IP address of launched instances in Gb200 Capacity Block
2- 172.31.51.93
3- 172.31.48.43
2+ 0.0.0.0
3+ 0.0.0.0
4+ 0.0.0.0
5+ 0.0.0.0
6+ 0.0.0.0
7+ 0.0.0.0
8+ 0.0.0.0
9+ 0.0.0.0
10+ 0.0.0.0
You can’t perform that action at this time.
0 commit comments