Skip to content

(3.13.1) Build Image Fails on Rocky 9

Himani Anil Deshpande edited this page Jun 12, 2025 · 2 revisions

The issue

Building a custom image with pcluster build-image fails on Rocky 9, because ParallelCluster pins kernel-abi-stablelists and kernel-devel to the wrong version if the packages are not installed in the parent image. This issue is surfaced in CloudWatch log /aws/imagebuilder/<image-name>:

Problem 1: package efa-2.15.0-1.el9.x86_64 from @commandline requires kernel-abi-stablelists, but none of the providers can be installed'

Affected ParallelCluster versions, OSes

  • ParallelCluster version 3.13.1
  • Rocky 9 <= 9.5
  • Clusters using already built custom images or PCluster official images are not affected

Mitigation

The mitigation is to install kernel packages to your parent AMI before running the pcluster build-image command:

#!/bin/bash
FILE=/etc/os-release
. "$FILE"
if [[ ! -f /etc/yum/vars/releasever ]]; then
    echo "yes" > /opt/parallelcluster/pin_releasesever
    echo "$VERSION_ID" > /etc/yum/vars/releasever
    yum clean all
fi
yum install -y kernel-abi-stablelists
PACKAGE_LIST="kernel-headers-$(uname -r) kernel-devel-$(uname -r) kernel-devel-matched-$(uname -r)"
REPOSITORY="AppStream"
yum install -y wget
for PACKAGE in $PACKAGE_LIST
do
 # try to install kernel source for a specific release version
 yum install -y $PACKAGE
 if [ $? -ne 0 ]; then
  echo "Installing kernel-devel from vault"
  # 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/$VERSION_ID/$REPOSITORY/$(uname -m)/os/Packages/k/$PACKAGE.rpm
  yum install -y ./$PACKAGE.rpm
 fi
done
if [ -f /opt/parallelcluster/pin_releasesever ]; then
  rm -f /opt/parallelcluster/pin_releasesever
  rm -f /etc/yum/vars/releasever
fi

Clone this wiki locally