Skip to content

Commit

Permalink
Fail build image when using a kernel version not supported by FSx for…
Browse files Browse the repository at this point in the history
… Lustre

Initially we decided to not fail, because when we released the first version of RH8
support only 8.4 was available, so we didn't want to release a broken functionality.

Anyway at that point we can use the same approach we're using for CentOS7
and fail the build if the kernel version is not compatible with FSx for Lustre.

This will permit us and users to discover this incompatibility at build image time,
rather than at cluster creation time if using FSx storage.

### Tests
Verified with an AMI with kernel `4.18.0-425.13.1.el8_7.x86_64`

```
bash kitchen.ec2.sh environment-install converge lustre-rhel8
...
[2023-11-22T15:13:09+00:00] FATAL: RuntimeError: test_resource[resource] (aws-parallelcluster-tests::test_resource line 30) had an error:
RuntimeError: lustre[test] (aws-parallelcluster-tests::test_resource line 8) had an error:
RuntimeError: FSx for Lustre is not supported in kernel version 4.18.0-425.13.1.el8_7.x86_64 of RHEL 8.7, please update the kernel version
```

Signed-off-by: Enrico Usai <[email protected]>
  • Loading branch information
enrico-usai committed Nov 22, 2023
1 parent cdff989 commit c27ea98
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 12 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -27,15 +27,11 @@
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
raise "FSx for Lustre is not supported in this RHEL version #{version}, supported versions are >= 8.2"
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
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
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -27,15 +27,11 @@
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 Rocky Linux version #{version}, supported versions are >= 8.2" do
level :warn
end
raise "FSx for Lustre is not supported in this Rocky Linux version #{version}, supported versions are >= 8.2"
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 Rocky Linux, please update the kernel version" do
level :warn
end
raise "FSx for Lustre is not supported in kernel version #{node['cluster']['kernel_release']} of Rocky Linux, please update the kernel version"
else
action_install_lustre
end
Expand Down

0 comments on commit c27ea98

Please sign in to comment.