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

[release-3.8] Avoid to exit while trying to install a specific kernel-devel version #2603

Merged
merged 2 commits into from
Dec 14, 2023
Merged
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
Original file line number Diff line number Diff line change
Expand Up @@ -25,22 +25,25 @@
bash "Install kernel source" do
user 'root'
code <<-INSTALL_KERNEL_SOURCE
set -e
package="#{kernel_source_package}-#{kernel_source_package_version}"

# try to install kernel source for a specific release version
dnf install -y ${package} --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
wget https://dl.rockylinux.org/vault/rocky/#{node['platform_version']}/BaseOS/$(uname -m)/os/Packages/k/${package}.rpm
dnf install -y ./${package}.rpm
set -e
dnf install -y https://dl.rockylinux.org/vault/rocky/#{node['platform_version']}/BaseOS/#{node['kernel']['machine']}/os/Packages/k/${package}.rpm
fi
dnf clean all
INSTALL_KERNEL_SOURCE
end unless on_docker?
end

def kernel_source_package_version
node['kernel']['release']
end

def default_packages
# environment-modules required by EFA, Intel MPI and ARM PL
# iptables needed for IMDS setup
Expand Down
Loading