Skip to content

Commit

Permalink
Avoid /opt/intel when backing up, restoring, and mounting fs mount po…
Browse files Browse the repository at this point in the history
…ints on arm instances (#2718)
  • Loading branch information
dreambeyondorange committed May 2, 2024
1 parent caff1c3 commit 8268835
Show file tree
Hide file tree
Showing 3 changed files with 12 additions and 6 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -156,11 +156,11 @@ def __str__(self): # noqa: D105
@staticmethod
def _transform_compute_fleet_data(compute_fleet_data):
try:
compute_fleet_data[
ComputeFleetStatusManager.COMPUTE_FLEET_STATUS_ATTRIBUTE
] = ComputeFleetStatus.EVENT_HANDLER_STATUS_MAPPING.value.get(
compute_fleet_data.get(ComputeFleetStatusManager.COMPUTE_FLEET_STATUS_ATTRIBUTE),
str(ComputeFleetStatus.UNKNOWN),
compute_fleet_data[ComputeFleetStatusManager.COMPUTE_FLEET_STATUS_ATTRIBUTE] = (
ComputeFleetStatus.EVENT_HANDLER_STATUS_MAPPING.value.get(
compute_fleet_data.get(ComputeFleetStatusManager.COMPUTE_FLEET_STATUS_ATTRIBUTE),
str(ComputeFleetStatus.UNKNOWN),
)
)
return compute_fleet_data
except AttributeError as e:
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -58,7 +58,12 @@
# Since this is a shared directory, it needs to be defined here first instead of in the dependent cookbook for slurm
default['cluster']['slurm']['install_dir'] = '/opt/slurm'

default['cluster']['internal_shared_dirs'] = [node['cluster']['shared_dir'], node['cluster']['shared_dir_login_nodes'], node['cluster']['slurm']['install_dir'], "/opt/intel"]
default['cluster']['internal_shared_dirs'] = if x86_instance?
[node['cluster']['shared_dir'], node['cluster']['shared_dir_login_nodes'], node['cluster']['slurm']['install_dir'], "/opt/intel"]
else
[node['cluster']['shared_dir'], node['cluster']['shared_dir_login_nodes'], node['cluster']['slurm']['install_dir']]
end

default['cluster']['internal_initial_shared_dir'] = "#{node['cluster']['base_dir']}/init_shared"

default['cluster']['head_node_private_ip'] = nil
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -19,6 +19,7 @@
# This is necessary to preserve any data in these directories that was
# generated during the build of ParallelCluster AMIs after converting to
# shared storage
Chef::Log.info("Backup internal dirs #{node['cluster']['internal_shared_dirs']}")
node['cluster']['internal_shared_dirs'].each do |dir|
bash "Backup #{dir}" do
user 'root'
Expand Down

0 comments on commit 8268835

Please sign in to comment.