Skip to content

Commit bc75f4c

Browse files
committed
[IMEX] Remove unnecessary condition to skip creation of main and nodes config file.
1 parent 7ffb589 commit bc75f4c

File tree

1 file changed

+2
-8
lines changed

1 file changed

+2
-8
lines changed

cookbooks/aws-parallelcluster-platform/resources/nvidia_imex/partial/_nvidia_imex_common.rb

Lines changed: 2 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -39,17 +39,15 @@
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?
9492
end
9593

96-
def file_exists_and_cluster_update?(file_path)
97-
::File.exist?(file_path) && !are_queues_updated?
98-
end
99-
10094
def nvidia_imex_main_conf_file
10195
"#{node['cluster']['nvidia']['imex']['shared_dir']}/config_#{node['cluster']['launch_template_id']}.cfg"
10296
end

0 commit comments

Comments
 (0)