Skip to content

Commit 9d60526

Browse files
committed
[B200] Pin kernel-modules-extra before the execution of the cookbook, and unpin it at the end of build image.
1 parent a10344a commit 9d60526

File tree

1 file changed

+4
-4
lines changed

1 file changed

+4
-4
lines changed

cli/src/pcluster/resources/imagebuilder/parallelcluster.yaml

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -124,12 +124,12 @@ phases:
124124
125125
yum install -y yum-plugin-versionlock
126126
# listing all the packages because wildcard does not work as expected
127-
yum versionlock ${!KERNEL_PACKAGES_PREFIX} ${!KERNEL_PACKAGES_PREFIX}-core ${!KERNEL_PACKAGES_PREFIX}-modules
127+
yum versionlock ${!KERNEL_PACKAGES_PREFIX} ${!KERNEL_PACKAGES_PREFIX}-core ${!KERNEL_PACKAGES_PREFIX}-modules ${!KERNEL_PACKAGES_PREFIX}-modules-extra
128128
[[ $OS =~ rocky ]] && yum versionlock rocky-release rocky-repos
129129
[[ $OS =~ rhel ]] && yum versionlock redhat-release
130130
else
131131
apt-get -y install linux-headers-$(uname -r) linux-modules-extra-$(uname -r)
132-
apt-mark hold linux-aws* linux-base* linux-headers* linux-image*
132+
apt-mark hold linux-aws* linux-base* linux-headers* linux-image* linux-modules-extra*
133133
fi
134134
echo "Kernel version is $(uname -a)"
135135
@@ -245,11 +245,11 @@ phases:
245245
246246
# Remove kernel version lock
247247
if [[ ${!PLATFORM} == RHEL ]]; then
248-
yum versionlock delete ${!KERNEL_PACKAGES_PREFIX} ${!KERNEL_PACKAGES_PREFIX}-core ${!KERNEL_PACKAGES_PREFIX}-modules
248+
yum versionlock delete ${!KERNEL_PACKAGES_PREFIX} ${!KERNEL_PACKAGES_PREFIX}-core ${!KERNEL_PACKAGES_PREFIX}-modules ${!KERNEL_PACKAGES_PREFIX}-modules-extra
249249
[[ $OS =~ rocky ]] && yum versionlock delete rocky-release rocky-repos
250250
[[ $OS =~ rhel ]] && yum versionlock delete redhat-release
251251
else
252-
apt-mark unhold linux-aws* linux-base* linux-headers* linux-image*
252+
apt-mark unhold linux-aws* linux-base* linux-headers* linux-image* linux-modules-extra*
253253
fi
254254
255255
# Handle SSM agent

0 commit comments

Comments
 (0)