Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

CentOS 8 PowerTools repo needs to be lowercase in newer kernel versions #831

Merged
merged 1 commit into from
Dec 9, 2020
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
6 changes: 4 additions & 2 deletions attributes/default.rb
Original file line number Diff line number Diff line change
Expand Up @@ -332,11 +332,13 @@
'centos' => { '>=7.7' => "https://fsx-lustre-client-repo-public-keys.s3.amazonaws.com/fsx-rpm-public-key.asc" },
'ubuntu' => { 'default' => "https://fsx-lustre-client-repo-public-keys.s3.amazonaws.com/fsx-ubuntu-public-key.asc" }
)
# Lustre repo string is built following the official doc
# https://docs.aws.amazon.com/fsx/latest/LustreGuide/install-lustre-client.html
default['cfncluster']['lustre']['base_url'] = value_for_platform(
'centos' => {
# node['kernel']['machine'] contains the architecture: 'x86_64' or 'aarch64'
'>=8' => "https://fsx-lustre-client-repo.s3.amazonaws.com/el/8#{find_rhel_minor_version}/#{node['kernel']['machine']}/",
'default' => "https://fsx-lustre-client-repo.s3.amazonaws.com/el/7#{find_rhel_minor_version}/x86_64/"
'>=8' => "https://fsx-lustre-client-repo.s3.amazonaws.com/el/8.#{find_rhel_minor_version}/#{node['kernel']['machine']}/",
'default' => "https://fsx-lustre-client-repo.s3.amazonaws.com/el/7.#{find_rhel_minor_version}/x86_64/"
},
'ubuntu' => { 'default' => "https://fsx-lustre-client-repo.s3.amazonaws.com/ubuntu" }
)
Expand Down
12 changes: 5 additions & 7 deletions libraries/helpers.rb
Original file line number Diff line number Diff line change
Expand Up @@ -330,15 +330,13 @@ def find_rhel_minor_version
kernel_patch_version = node['kernel']['release'].match(/^\d+\.\d+\.\d+-(\d+)\..*$/)
raise "Unable to retrieve the kernel patch version from #{node['kernel']['release']}." unless kernel_patch_version

# Lustre repo string will be built following the official doc
# https://docs.aws.amazon.com/fsx/latest/LustreGuide/install-lustre-client.html
if node['platform_version'].to_i == 7
os_minor_version = '.7' if kernel_patch_version[1] >= '1062'
os_minor_version = '.8' if kernel_patch_version[1] >= '1127'
os_minor_version = '.9' if kernel_patch_version[1] >= '1160'
os_minor_version = '7' if kernel_patch_version[1] >= '1062'
os_minor_version = '8' if kernel_patch_version[1] >= '1127'
os_minor_version = '9' if kernel_patch_version[1] >= '1160'
elsif node['platform_version'].to_i == 8
os_minor_version = '.2' if kernel_patch_version[1] >= '193'
os_minor_version = '.3' if kernel_patch_version[1] >= '240'
os_minor_version = '2' if kernel_patch_version[1] >= '193'
os_minor_version = '3' if kernel_patch_version[1] >= '240'
else
raise "CentOS version #{node['platform_version']} not supported."
end
Expand Down
8 changes: 4 additions & 4 deletions recipes/base_install.rb
Original file line number Diff line number Diff line change
Expand Up @@ -32,10 +32,10 @@
end
end
if node['platform'] == 'centos' && node['platform_version'].to_i == 8
# Enable PowerTools Repo so *-devel packages can be installed with DNF
# Enable EPEL repos
execute 'dnf enable powertools and EPEL repos' do
command "dnf config-manager --set-enabled PowerTools && dnf install -y epel-release"
# Enable powertools repo so *-devel packages can be installed with DNF
powertools_repo = find_rhel_minor_version <= '2' ? "PowerTools" : "powertools"
execute 'dnf enable powertools' do
command "dnf config-manager --set-enabled #{powertools_repo}"
end
end

Expand Down