Skip to content

Commit 2cf32fb

Browse files
committed
kernel-matched
1 parent 40c2d54 commit 2cf32fb

File tree

1 file changed

+6
-1
lines changed

1 file changed

+6
-1
lines changed

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

Lines changed: 6 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -26,21 +26,26 @@
2626
user 'root'
2727
code <<-INSTALL_KERNEL_SOURCE
2828
package="#{kernel_source_package}-#{kernel_source_package_version}"
29+
matched="kernel-matched-#{kernel_source_package_version}"
2930
3031
# try to install kernel source for a specific release version
31-
dnf install -y ${package} --releasever #{node['platform_version']}
32+
dnf install -y ${package} ${matched} --releasever #{node['platform_version']}
3233
if [ $? -ne 0 ]; then
3334
# Previous releases are moved into a vault area once a new minor release version is available for at least a week.
3435
# https://wiki.rockylinux.org/rocky/repo/#notes-on-devel
3536
base_os_package_url="https://dl.rockylinux.org/vault/rocky/#{node['platform_version']}/BaseOS/#{node['kernel']['machine']}/os/Packages/k/${package}.rpm"
3637
appstream_package_url="https://dl.rockylinux.org/vault/rocky/#{node['platform_version']}/AppStream/#{node['kernel']['machine']}/os/Packages/k/${package}.rpm"
38+
base_os_matched_url="https://dl.rockylinux.org/vault/rocky/#{node['platform_version']}/BaseOS/#{node['kernel']['machine']}/os/Packages/k/${matched}.rpm"
39+
appstream_matched_url="https://dl.rockylinux.org/vault/rocky/#{node['platform_version']}/AppStream/#{node['kernel']['machine']}/os/Packages/k/${matched}.rpm"
3740
base_os_status_code=$(curl --write-out '%{http_code}' --silent --output /dev/null ${base_os_package_url})
3841
appstream_status_code=$(curl --write-out '%{http_code}' --silent --output /dev/null ${appstream_package_url})
3942
set -e
4043
if [ $base_os_status_code != 404 ]; then
4144
dnf install -y ${base_os_package_url}
45+
dnf install -y ${base_os_matched_url}
4246
elif [ $appstream_status_code != 404 ]; then
4347
dnf install -y ${appstream_package_url}
48+
dnf install -y ${appstream_matched_url}
4449
fi
4550
fi
4651
dnf clean all

0 commit comments

Comments
 (0)