Skip to content

Commit 362633a

Browse files
committed
Avoid to exit while trying to install a specific kernel-devel version
This code has been created to try to install using `--releasever` parameter and if this command fails try to install the package from vault, anyway the `set -e` at the top of the failing was causing all the build to fail. Manually tested in a Rocky-8-EC2-Base-8.8-20230518.0.x86_64 Related to: #2598 Signed-off-by: Enrico Usai <[email protected]>
1 parent 8b869b5 commit 362633a

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

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

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -25,14 +25,14 @@
2525
bash "Install kernel source" do
2626
user 'root'
2727
code <<-INSTALL_KERNEL_SOURCE
28-
set -e
2928
package="#{kernel_source_package}-#{kernel_source_package_version}"
3029
3130
# try to install kernel source for a specific release version
3231
dnf install -y ${package} --releasever #{node['platform_version']}
3332
if [ $? -ne 0 ]; then
3433
# Previous releases are moved into a vault area once a new minor release version is available for at least a week.
3534
# https://wiki.rockylinux.org/rocky/repo/#notes-on-devel
35+
set -e
3636
wget https://dl.rockylinux.org/vault/rocky/#{node['platform_version']}/BaseOS/$(uname -m)/os/Packages/k/${package}.rpm
3737
dnf install -y ./${package}.rpm
3838
fi

0 commit comments

Comments
 (0)