Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
25 changes: 9 additions & 16 deletions cookbooks/aws-parallelcluster-config/recipes/base.rb
Original file line number Diff line number Diff line change
Expand Up @@ -27,23 +27,16 @@

include_recipe 'aws-parallelcluster-config::nfs' unless virtualized?

# Mount the ephemeral drive unless there is a mountpoint collision with shared drives
shared_dir_array = node['cluster']['ebs_shared_dirs'].split(',') + \
node['cluster']['efs_shared_dirs'].split(',') + \
node['cluster']['fsx_shared_dirs'].split(',') + \
[ node['cluster']['raid_shared_dir'] ]
unless shared_dir_array.include? node['cluster']['ephemeral_dir']
service "setup-ephemeral" do
supports restart: false
action :enable
end
service "setup-ephemeral" do
supports restart: false
action :enable
end

# Execution timeout 3600 seconds
unless virtualized?
execute "Setup of ephemeral drives" do
user "root"
command "/usr/local/sbin/setup-ephemeral-drives.sh"
end
# Execution timeout 3600 seconds
unless virtualized?
execute "Setup of ephemeral drivers" do
user "root"
command "/usr/local/sbin/setup-ephemeral-drives.sh"
end
end

Expand Down
32 changes: 8 additions & 24 deletions cookbooks/aws-parallelcluster-test/recipes/tests.rb
Original file line number Diff line number Diff line change
Expand Up @@ -334,25 +334,9 @@ module load intelmpi && mpirun --help | grep '#{node['cluster']['intelmpi']['kit
###################
# instance store
###################

ebs_shared_dirs_array = node['cluster']['ebs_shared_dirs'].split(',')

if ebs_shared_dirs_array.include? node['cluster']['ephemeral_dir']
# In this case the ephemeral storage should not be mounted because the mountpoint
# clashes with the mountpoint coming from t
bash 'test instance store mountpoint collision' do
cwd Chef::Config[:file_cache_path]
user node['cluster']['cluster_user']
code <<-COLLISION
systemctl show setup-ephemeral.service -p ActiveState | grep "=inactive"
systemctl show setup-ephemeral.service -p UnitFileState | grep "=disabled"
COLLISION
end
else
bash 'test instance store' do
cwd Chef::Config[:file_cache_path]
user node['cluster']['cluster_user']
code <<-EPHEMERAL
bash 'test instance store' do
cwd Chef::Config[:file_cache_path]
code <<-EPHEMERAL
set -xe
EPHEMERAL_DIR="#{node['cluster']['ephemeral_dir']}"

Expand Down Expand Up @@ -405,11 +389,11 @@ module load intelmpi && mpirun --help | grep '#{node['cluster']['intelmpi']['kit
mkdir -p ${EPHEMERAL_DIR}/test_dir
touch ${EPHEMERAL_DIR}/test_dir/test_file
fi
EPHEMERAL
end
execute 'check setup-ephemeral service is enabled' do
command "systemctl is-enabled setup-ephemeral"
end
EPHEMERAL
user node['cluster']['cluster_user']
end
execute 'check setup-ephemeral service is enabled' do
command "systemctl is-enabled setup-ephemeral"
end

###################
Expand Down