Skip to content

Commit

Permalink
Revert "Prevent mountpoint collision between ephemeral drive and shar…
Browse files Browse the repository at this point in the history
…ed drives (#1589)" (#1593)

This reverts commit fe7d847.
  • Loading branch information
eantonin authored Nov 11, 2022
1 parent fe7d847 commit b96372a
Show file tree
Hide file tree
Showing 2 changed files with 17 additions and 40 deletions.
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

0 comments on commit b96372a

Please sign in to comment.