Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -25,13 +25,15 @@

action :setup do
version = node['platform_version']
log "Installing FSx for Lustre. Platform version: #{version}, kernel version: #{node['cluster']['kernel_release']}"
if version.to_f < 8.2
log "FSx for Lustre is not supported in this RHEL version #{version}, supported versions are >= 8.2" do
level :warn
end
# rhel8 kernel 4.18.0-425.3.1.el8 has broken kABI compat https://github.com/openzfs/zfs/issues/14724
elsif node['cluster']['kernel_release'].include? "4.18.0-425.3.1.el8"
log "FSx for Lustre is not supported in kernel version 4.18.0-425.3.1.el8 of RHEL, please update the kernel version" do
elsif version.to_f == 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
log "FSx for Lustre is not supported in kernel version #{node['cluster']['kernel_release']} of RHEL #{version}, please update the kernel version" do
level :warn
end
else
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -171,21 +171,23 @@ def self.setup(chef_run)
end
end

context "on redhat with kernel 4.18.0-425.3.1.el8" do
cached(:chef_run) do
runner = runner(
platform: 'redhat', version: '8',
step_into: ['lustre']
) do |node|
node.automatic['platform_version'] = "8.2"
node.override['cluster']['kernel_release'] = "anything 4.18.0-425.3.1.el8 something"
[%w(8.7 4.18.0-425.3.1.el8.x86_64), %w(8.7 4.18.0-425.13.1.el8_7.x86_64)].each do |platform_version, kernel_version|
context "on redhat #{platform_version} with kernel #{kernel_version}" do
cached(:chef_run) do
runner = runner(
platform: 'redhat', version: '8',
step_into: ['lustre']
) do |node|
node.automatic['platform_version'] = platform_version
node.override['cluster']['kernel_release'] = kernel_version
end
Lustre.setup(runner)
end
Lustre.setup(runner)
end

it 'can not install lustre' do
is_expected.to write_log("FSx for Lustre is not supported in kernel version 4.18.0-425.3.1.el8 of RHEL, please update the kernel version")
.with(level: :warn)
it 'can not install lustre' do
is_expected.to write_log("FSx for Lustre is not supported in kernel version #{kernel_version} of RHEL #{platform_version}, please update the kernel version")
.with(level: :warn)
end
end
end

Expand Down
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
control 'tag:install_lustre_client_installed' do
title "Verify that lustre client is installed"
minimal_lustre_client_version = '2.12'
if (os_properties.centos? && inspec.os.release.to_f >= 7.5) || os_properties.redhat?
if os_properties.centos? && inspec.os.release.to_f >= 7.5
describe package('kmod-lustre-client') do
it { should be_installed }
end
Expand All @@ -10,7 +10,33 @@
it { should be_installed }
end

if (os_properties.centos? && inspec.os.release.to_f >= 7.7) || os_properties.redhat?
if os_properties.centos? && inspec.os.release.to_f >= 7.7
describe package('kmod-lustre-client') do
its('version') { should cmp >= minimal_lustre_client_version }
end

describe package('lustre-client') do
its('version') { should cmp >= minimal_lustre_client_version }
end

describe yum.repo('aws-fsx') do
it { should exist }
it { should be_enabled }
its('baseurl') { should include 'fsx-lustre-client-repo.s3.amazonaws.com' }
end
end
end

if os_properties.redhat? && inspec.os.release.to_f >= 8.2
unless inspec.os.release.to_f == 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"))
describe package('kmod-lustre-client') do
it { should be_installed }
end

describe package('lustre-client') do
it { should be_installed }
end

describe package('kmod-lustre-client') do
its('version') { should cmp >= minimal_lustre_client_version }
end
Expand Down Expand Up @@ -60,10 +86,12 @@
control 'tag:install_lustre_lnet_kernel_module_enabled' do
title "Verify that lnet kernel module is enabled"
only_if { !os_properties.on_docker? && !os_properties.alinux2? }
describe kernel_module("lnet") do
it { should be_loaded }
it { should_not be_disabled }
it { should_not be_blacklisted }
unless os_properties.redhat? && inspec.os.release.to_f == 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"))
describe kernel_module("lnet") do
it { should be_loaded }
it { should_not be_disabled }
it { should_not be_blacklisted }
end
end
end

Expand Down
6 changes: 3 additions & 3 deletions kitchen.docker.yml
Original file line number Diff line number Diff line change
Expand Up @@ -38,14 +38,14 @@ platforms:
attributes:
cluster:
base_os: alinux2
kernel_release: '5.10.157-139.675.amzn2.x86_64'
kernel_release: '5.10.157-139.675.amzn2.fake-value'
- name: centos7
driver:
image: <% if ENV['KITCHEN_CENTOS7_IMAGE'] %> <%= ENV['KITCHEN_CENTOS7_IMAGE'] %> <% else %> dokken/centos-7 <% end %>
attributes:
cluster:
base_os: centos7
kernel_release: '3.10.0-1160.76.1.el7.x86_64'
kernel_release: '3.10.0-1160.76.1.el7.fake-value'
- name: ubuntu2004
driver:
image: <% if ENV['KITCHEN_UBUNTU2004_IMAGE'] %> <%= ENV['KITCHEN_UBUNTU2004_IMAGE'] %> <% else %> dokken/ubuntu-20.04 <% end %>
Expand All @@ -68,4 +68,4 @@ platforms:
attributes:
cluster:
base_os: rhel8
kernel_release: '4.18.0-425.13.1.el8_7.x86_64'
kernel_release: '4.18.0-477.13.1.el8_7.fake-value' # Use 477 version to match 8.8 kernel version available on docker