From b96372af2799f7ed3d988d0f0c0f4e8fec0fbf3d Mon Sep 17 00:00:00 2001 From: eantonin <83351137+eantonin@users.noreply.github.com> Date: Fri, 11 Nov 2022 17:30:57 +0100 Subject: [PATCH] Revert "Prevent mountpoint collision between ephemeral drive and shared drives (#1589)" (#1593) This reverts commit fe7d84790af792f0f58f549cd50f2f09ea221c0a. --- .../recipes/base.rb | 25 ++++++--------- .../aws-parallelcluster-test/recipes/tests.rb | 32 +++++-------------- 2 files changed, 17 insertions(+), 40 deletions(-) diff --git a/cookbooks/aws-parallelcluster-config/recipes/base.rb b/cookbooks/aws-parallelcluster-config/recipes/base.rb index 82b2b5e60..bdf3dbd17 100644 --- a/cookbooks/aws-parallelcluster-config/recipes/base.rb +++ b/cookbooks/aws-parallelcluster-config/recipes/base.rb @@ -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 diff --git a/cookbooks/aws-parallelcluster-test/recipes/tests.rb b/cookbooks/aws-parallelcluster-test/recipes/tests.rb index 2a358f276..61b933cab 100644 --- a/cookbooks/aws-parallelcluster-test/recipes/tests.rb +++ b/cookbooks/aws-parallelcluster-test/recipes/tests.rb @@ -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']}" @@ -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 ###################