Skip to content

Commit 96cc258

Browse files
committed
Install kernel-devel for Rocky Linux from vault
Previous releases are moved into a vault area once a new minor release version is available for at least a week. This means we cannot use `--releasever` to install 8.8 version because it is not more available in the repo. On RHEL8 instead all versions of the packages will remain available. With this patch we're downloading this specific package from vault and installing it. ## Tests Manual execution of the new steps. ## References * https://wiki.rockylinux.org/rocky/repo/#notes-on-devel Signed-off-by: Enrico Usai <[email protected]>
1 parent 25a1a91 commit 96cc258

File tree

1 file changed

+12
-1
lines changed

1 file changed

+12
-1
lines changed

cookbooks/aws-parallelcluster-platform/resources/install_packages/install_packages_rocky8.rb

Lines changed: 12 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -20,11 +20,22 @@
2020
use 'partial/_install_packages_rhel_amazon.rb'
2121

2222
action :install_kernel_source do
23+
# Previous releases are moved into a vault area once a new minor release version is available for at least a week.
24+
# https://wiki.rockylinux.org/rocky/repo/#notes-on-devel
2325
bash "Install kernel source" do
2426
user 'root'
2527
code <<-INSTALL_KERNEL_SOURCE
2628
set -e
27-
dnf install -y #{kernel_source_package}-#{kernel_source_package_version} --releasever #{node['platform_version']}
29+
package="#{kernel_source_package}-#{kernel_source_package_version}"
30+
31+
# try to install kernel source for a specific release version
32+
dnf install -y ${package} --releasever #{node['platform_version']}
33+
if [ $? -ne 0 ]; then
34+
# Previous releases are moved into a vault area once a new minor release version is available for at least a week.
35+
# https://wiki.rockylinux.org/rocky/repo/#notes-on-devel
36+
wget https://dl.rockylinux.org/vault/rocky/#{node['platform_version']}/BaseOS/$(uname -m)/os/Packages/k/${package}.rpm
37+
dnf install -y ./${package}.rpm
38+
fi
2839
dnf clean all
2940
INSTALL_KERNEL_SOURCE
3041
end unless on_docker?

0 commit comments

Comments
 (0)