From 2cf32fbf49c25f00aded992d16c905d58e3f2fdb Mon Sep 17 00:00:00 2001 From: Helena Greebe Date: Fri, 13 Dec 2024 09:59:51 -0500 Subject: [PATCH] kernel-matched --- .../resources/install_packages/install_packages_rocky8.rb | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) diff --git a/cookbooks/aws-parallelcluster-platform/resources/install_packages/install_packages_rocky8.rb b/cookbooks/aws-parallelcluster-platform/resources/install_packages/install_packages_rocky8.rb index 21780db7b..73dcb3c7a 100644 --- a/cookbooks/aws-parallelcluster-platform/resources/install_packages/install_packages_rocky8.rb +++ b/cookbooks/aws-parallelcluster-platform/resources/install_packages/install_packages_rocky8.rb @@ -26,21 +26,26 @@ user 'root' code <<-INSTALL_KERNEL_SOURCE package="#{kernel_source_package}-#{kernel_source_package_version}" + matched="kernel-matched-#{kernel_source_package_version}" # try to install kernel source for a specific release version - dnf install -y ${package} --releasever #{node['platform_version']} + dnf install -y ${package} ${matched} --releasever #{node['platform_version']} if [ $? -ne 0 ]; then # Previous releases are moved into a vault area once a new minor release version is available for at least a week. # https://wiki.rockylinux.org/rocky/repo/#notes-on-devel base_os_package_url="https://dl.rockylinux.org/vault/rocky/#{node['platform_version']}/BaseOS/#{node['kernel']['machine']}/os/Packages/k/${package}.rpm" appstream_package_url="https://dl.rockylinux.org/vault/rocky/#{node['platform_version']}/AppStream/#{node['kernel']['machine']}/os/Packages/k/${package}.rpm" + base_os_matched_url="https://dl.rockylinux.org/vault/rocky/#{node['platform_version']}/BaseOS/#{node['kernel']['machine']}/os/Packages/k/${matched}.rpm" + appstream_matched_url="https://dl.rockylinux.org/vault/rocky/#{node['platform_version']}/AppStream/#{node['kernel']['machine']}/os/Packages/k/${matched}.rpm" base_os_status_code=$(curl --write-out '%{http_code}' --silent --output /dev/null ${base_os_package_url}) appstream_status_code=$(curl --write-out '%{http_code}' --silent --output /dev/null ${appstream_package_url}) set -e if [ $base_os_status_code != 404 ]; then dnf install -y ${base_os_package_url} + dnf install -y ${base_os_matched_url} elif [ $appstream_status_code != 404 ]; then dnf install -y ${appstream_package_url} + dnf install -y ${appstream_matched_url} fi fi dnf clean all