From 9321be0eb427c5392ad56849eddb50490dbea1b3 Mon Sep 17 00:00:00 2001 From: Himani Deshpande Date: Fri, 11 Oct 2024 09:05:51 -0400 Subject: [PATCH] Using cookbook file as template doesnt seem to work --- .../files/pyxis/pyxis.conf | 1 + .../resources/enroot/partial/_enroot_common.rb | 12 ++++++++++-- 2 files changed, 11 insertions(+), 2 deletions(-) create mode 100644 cookbooks/aws-parallelcluster-platform/files/pyxis/pyxis.conf diff --git a/cookbooks/aws-parallelcluster-platform/files/pyxis/pyxis.conf b/cookbooks/aws-parallelcluster-platform/files/pyxis/pyxis.conf new file mode 100644 index 000000000..8e6f403cd --- /dev/null +++ b/cookbooks/aws-parallelcluster-platform/files/pyxis/pyxis.conf @@ -0,0 +1 @@ +required /usr/local/lib/slurm/spank_pyxis.so runtime_path=/opt/parallelcluster/shared/pyxis diff --git a/cookbooks/aws-parallelcluster-platform/resources/enroot/partial/_enroot_common.rb b/cookbooks/aws-parallelcluster-platform/resources/enroot/partial/_enroot_common.rb index 845d2273b..b859b8e2f 100644 --- a/cookbooks/aws-parallelcluster-platform/resources/enroot/partial/_enroot_common.rb +++ b/cookbooks/aws-parallelcluster-platform/resources/enroot/partial/_enroot_common.rb @@ -69,14 +69,22 @@ retry_delay 5 end - template "#{node['cluster']['slurm']['install_dir']}/etc/plugstack.conf.d/pyxis.conf " do + cookbook_file "#{node['cluster']['slurm']['install_dir']}/etc/plugstack.conf.d/pyxis.conf" do source 'pyxis/pyxis.conf.erb' cookbook 'aws-parallelcluster-platform' owner 'root' group 'root' - mode '0755' # TODO: Chnage the permission + mode '0755' end + # template "#{node['cluster']['slurm']['install_dir']}/etc/plugstack.conf.d/pyxis.conf " do + # source 'pyxis/pyxis.conf.erb' + # cookbook 'aws-parallelcluster-platform' + # owner 'root' + # group 'root' + # mode '0755' # TODO: Chnage the permission + # end + bash "Configure Pyxis" do user 'root' code <<-PYXIS_CONFIGURE