Skip to content

Commit a9b81e3

Browse files
committed
Pin minor version only if customer has not done so already
1 parent 96990c5 commit a9b81e3

File tree

2 files changed

+8
-2
lines changed

2 files changed

+8
-2
lines changed

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

Lines changed: 5 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -195,8 +195,11 @@ phases:
195195
196196
if [[ ${!PLATFORM} == RHEL ]]; then
197197
if [[ ${!OS} == rhel9 ]] || [[ ${!OS} == rocky9 ]]; then
198-
echo ${!VERSION} > /etc/yum/vars/releasever
199-
yum clean all
198+
if [[ ! -f /etc/yum/vars/releasever ]]; then
199+
echo "yes" > /opt/parallelcluster/pin_releasesever
200+
echo ${!VERSION} > /etc/yum/vars/releasever
201+
yum clean all
202+
fi
200203
fi
201204
yum -y update krb5-libs
202205
yum -y groupinstall development && sudo yum -y install curl wget jq

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

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -168,9 +168,12 @@ phases:
168168
PLATFORM='{{ build.PlatformName.outputs.stdout }}'
169169
VERSION='{{ build.OperatingSystemVersion.outputs.stdout }}'
170170
if [[ ${!OS} == rhel9 ]] || [[ ${!OS} == rocky9 ]]; then
171+
if [[ ! -f /etc/yum/vars/releasever ]]; then
172+
echo "yes" > /opt/parallelcluster/pin_releasesever
171173
echo ${!VERSION} > /etc/yum/vars/releasever
172174
yum clean all
173175
fi
176+
fi
174177
175178
if [[ ${!PLATFORM} == RHEL ]]; then
176179
yum -y install jq

0 commit comments

Comments
 (0)