in cookbooks/aws-parallelcluster-environment/recipes/config/update_shared_storages.rb [125:147]
def get_raid(action)
if action == UNMOUNT_ACTION
in_shared_storages_mapping = node['cluster']['shared_storages_mapping']
not_in_shared_storages_mapping = node['cluster']['update_shared_storages_mapping']
elsif action == MOUNT_ACTION
in_shared_storages_mapping = node['cluster']['update_shared_storages_mapping']
not_in_shared_storages_mapping = node['cluster']['shared_storages_mapping']
end
raid_shared_dir = nil
raid_type = nil
raid_vol_array = []
unless in_shared_storages_mapping["raid"].nil?
in_shared_storages_mapping["raid"].each do |storage|
next unless not_in_shared_storages_mapping["raid"].nil? || !not_in_shared_storages_mapping["raid"].include?(storage)
raid_shared_dir = storage["raid_shared_dir"]
raid_type = storage["raid_type"].to_s
raid_vol_array = storage["raid_vol_array"]
end
end
[raid_shared_dir, raid_type, raid_vol_array]
end