Skip to content

Commit 024a18c

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: #2597 Signed-off-by: Enrico Usai <[email protected]>
1 parent 552d205 commit 024a18c

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
@@ -23,12 +23,12 @@
2323
bash "Install kernel source" do
2424
user 'root'
2525
code <<-INSTALL_KERNEL_SOURCE
26-
set -e
2726
package="#{kernel_source_package}-#{kernel_source_package_version}"
2827
2928
# try to install kernel source for a specific release version
3029
dnf install -y ${package} --releasever #{node['platform_version']}
3130
if [ $? -ne 0 ]; then
31+
set -e
3232
# Previous releases are moved into a vault area once a new minor release version is available for at least a week.
3333
# https://wiki.rockylinux.org/rocky/repo/#notes-on-devel
3434
wget https://dl.rockylinux.org/vault/rocky/#{node['platform_version']}/BaseOS/$(uname -m)/os/Packages/k/${package}.rpm

0 commit comments

Comments
 (0)