cookbooks/aws-parallelcluster-environment/resources/lustre/lustre_redhat8.rb (35 lines of code) (raw):

# frozen_string_literal: true # # Copyright:: 2023 Amazon.com, Inc. or its affiliates. All Rights Reserved. # # Licensed under the Apache License, Version 2.0 (the "License"). # You may not use this file except in compliance with the License. # A copy of the License is located at # # http://aws.amazon.com/apache2.0/ # # or in the "LICENSE.txt" file accompanying this file. # This file is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, express or implied. # See the License for the specific language governing permissions and limitations under the License. provides :lustre, platform: 'redhat' do |node| node['platform_version'].to_i >= 8 end unified_mode true use 'partial/_install_lustre_centos_redhat' use 'partial/_mount_unmount' default_action :setup action :setup do version = node['platform_version'] log "Installing FSx for Lustre. Platform version: #{version}, kernel version: #{node['cluster']['kernel_release']}" current_version = Gem::Version.new(version) if current_version < Gem::Version.new("8.2") raise "FSx for Lustre is not supported in this RHEL version #{version}, supported versions are >= 8.2" elsif current_version == Gem::Version.new("8.7") && (node['cluster']['kernel_release'].include?("4.18.0-425.3.1.el8") || node['cluster']['kernel_release'].include?("4.18.0-425.13.1.el8_7")) # Rhel8.7 kernel 4.18.0-425.3.1.el8 and 4.18.0-425.13.1.el8_7 has broken kABI compat # See https://access.redhat.com/solutions/6985596 and https://github.com/openzfs/zfs/issues/14724 raise "FSx for Lustre is not supported in kernel version #{node['cluster']['kernel_release']} of RHEL #{version}, please update the kernel version" else action_install_lustre end end action_class do def base_url # https://docs.aws.amazon.com/fsx/latest/LustreGuide/install-lustre-client.html#lustre-client-rhel if aws_region.start_with?("us-iso") "https://fsx-lustre-client-repo.s3.#{aws_region}.#{aws_domain}/el/#{node['platform_version']}/$basearch" else "https://fsx-lustre-client-repo.s3.amazonaws.com/el/#{node['platform_version']}/$basearch" end end def public_key if aws_region.start_with?("us-iso") "https://fsx-lustre-client-repo-public-keys.s3.#{aws_region}.#{aws_domain}/fsx-rpm-public-key.asc" else "https://fsx-lustre-client-repo-public-keys.s3.amazonaws.com/fsx-rpm-public-key.asc" end end end