Skip to content

Commit 9c44fa0

Browse files
hanwen-clusterhanwen-pcluste
authored andcommitted
CentOS 7 is no longer supported
Signed-off-by: Hanwen <hanwenli@amazon.com>
1 parent 8383fc2 commit 9c44fa0

File tree

67 files changed

+169
-446
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

67 files changed

+169
-446
lines changed

CHANGELOG.md

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -19,6 +19,7 @@ CHANGELOG
1919
`cfn_bootstrap_virtualenv` is not added in PATH environment variable.
2020

2121
**CHANGES**
22+
- CentOS 7 is no longer supported.
2223
- Upgrade Cinc Client to version to 18.4.12 from 18.2.7.
2324
- Allow build-image to be run in an isolated network.
2425

cli/src/pcluster/cli/commands/configure/easyconfig.py

Lines changed: 1 addition & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -154,11 +154,7 @@ def configure(args): # noqa: C901
154154
default_instance_type = AWSApi.instance().ec2.get_default_instance_type()
155155
head_node_instance_type = prompt(
156156
"Head node instance type",
157-
lambda x: x in AWSApi.instance().ec2.list_instance_types()
158-
and ( # pcluster doesn't support CentOS7 with ARM
159-
base_os != "centos7"
160-
or AWSApi.instance().ec2.get_instance_type_info(x).supported_architecture()[0] == "x86_64"
161-
),
157+
lambda x: x in AWSApi.instance().ec2.list_instance_types(),
162158
default_value=default_instance_type,
163159
)
164160
if scheduler == "awsbatch":

cli/src/pcluster/cli/commands/dcv_util.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -18,6 +18,6 @@ def get_supported_dcv_os(architecture):
1818
"""Return a list of all the operating system supported by DCV."""
1919
architectures_dict = {
2020
"x86_64": [os for os in SUPPORTED_OSES if os not in UNSUPPORTED_OSES_FOR_DCV],
21-
"arm64": ["alinux2", "centos7", "rhel8", "rocky8", "rhel9", "rocky9"],
21+
"arm64": ["alinux2", "rhel8", "rocky8", "rhel9", "rocky9"],
2222
}
2323
return architectures_dict.get(architecture, [])

cli/src/pcluster/config/cluster_config.py

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1574,8 +1574,6 @@ def _register_validators(self, context: ValidatorContext = None): # noqa: D102
15741574
ArchitectureOsValidator,
15751575
os=self.image.os,
15761576
architecture=self.head_node.architecture,
1577-
custom_ami=self.image.custom_ami,
1578-
ami_search_filters=self.dev_settings.ami_search_filters if self.dev_settings else None,
15791577
)
15801578
if self.head_node_ami:
15811579
self._register_validator(

cli/src/pcluster/constants.py

Lines changed: 1 addition & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -23,7 +23,7 @@
2323

2424
SUPPORTED_SCHEDULERS = ["slurm", "awsbatch"]
2525
SCHEDULERS_SUPPORTING_IMDS_SECURED = ["slurm"]
26-
SUPPORTED_OSES = ["alinux2", "alinux2023", "centos7", "ubuntu2004", "ubuntu2204", "rhel8", "rocky8", "rhel9", "rocky9"]
26+
SUPPORTED_OSES = ["alinux2", "alinux2023", "ubuntu2004", "ubuntu2204", "rhel8", "rocky8", "rhel9", "rocky9"]
2727
SUPPORTED_OSES_FOR_SCHEDULER = {"slurm": SUPPORTED_OSES, "awsbatch": ["alinux2", "alinux2023"]}
2828
UNSUPPORTED_OSES_FOR_MICRO_NANO = ["ubuntu2004", "ubuntu2204", "rhel8", "rocky8", "rhel9", "rocky9"]
2929
DELETE_POLICY = "Delete"
@@ -37,7 +37,6 @@
3737
AWSBATCH = "awsbatch"
3838

3939
OS_MAPPING = {
40-
"centos7": {"user": "centos"},
4140
"alinux2": {"user": "ec2-user"},
4241
"alinux2023": {"user": "ec2-user"},
4342
"ubuntu2004": {"user": "ubuntu"},
@@ -51,7 +50,6 @@
5150
OS_TO_IMAGE_NAME_PART_MAP = {
5251
"alinux2": "amzn2-hvm",
5352
"alinux2023": "amzn2023-hvm",
54-
"centos7": "centos7-hvm",
5553
"ubuntu2004": "ubuntu-2004-lts-hvm",
5654
"ubuntu2204": "ubuntu-2204-lts-hvm",
5755
"rhel8": "rhel8-hvm",

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

Lines changed: 3 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -57,7 +57,7 @@ phases:
5757
[ -n "${CfnParamCincInstaller}" ] && CINC_URL="${CfnParamCincInstaller}"
5858
echo "${!CINC_URL}"
5959
60-
# Check input base AMI OS and get OS information, the output should be like centos.7 | amzn.2 | ubuntu.20.04 | ubuntu.22.04 | rhel.8.7 | rocky.8.8
60+
# Check input base AMI OS and get OS information, the output should be like amzn.2 | ubuntu.20.04 | ubuntu.22.04 | rhel.8.7 | rocky.8.8
6161
- name: OperatingSystemRelease
6262
action: ExecuteBash
6363
inputs:
@@ -86,8 +86,6 @@ phases:
8686
OS='alinux2'
8787
elif [ `echo "${!RELEASE}" | grep -w '^amzn\.2023'` ]; then
8888
OS='alinux2023'
89-
elif [ `echo "${!RELEASE}" | grep '^centos\.7'` ]; then
90-
OS='centos7'
9189
elif [ `echo "${!RELEASE}" | grep '^ubuntu\.20'` ]; then
9290
OS='ubuntu2004'
9391
elif [ `echo "${!RELEASE}" | grep '^ubuntu\.22'` ]; then
@@ -159,10 +157,10 @@ phases:
159157
exit {{ FailExitCode }}
160158
fi
161159
162-
# This component only supports aarch64 CPUs on Amazon Linux 2, Ubuntu2004, Ubuntu2204, Centos7, RHEL8, Rocky8, RHEL9 and Rocky9
160+
# This component only supports aarch64 CPUs on Amazon Linux 2, Ubuntu2004, Ubuntu2204, RHEL8, Rocky8, RHEL9 and Rocky9
163161
ARCH=$(uname -m)
164162
if [[ `echo ${!ARCH}` == 'aarch64' ]]; then
165-
if [ `echo "${!RELEASE}" | grep -Ev '^(amzn\.2|amzn\.2023|centos\.7|ubuntu\.20\.04|ubuntu\.22\.04|rhel\.8|rocky\.8|rhel\.9|rocky\.9)'` ]; then
163+
if [ `echo "${!RELEASE}" | grep -Ev '^(amzn\.2|amzn\.2023|ubuntu\.20\.04|ubuntu\.22\.04|rhel\.8|rocky\.8|rhel\.9|rocky\.9)'` ]; then
166164
echo "This component does not support '${!RELEASE}' on ARM64 CPUs. Failing build."
167165
exit {{ FailExitCode }}
168166
fi
@@ -180,9 +178,6 @@ phases:
180178
PLATFORM='{{ build.PlatformName.outputs.stdout }}'
181179
182180
if [[ ${!PLATFORM} == RHEL ]]; then
183-
if [[ ${!OS} == centos7 ]]; then
184-
yum -y install epel-release
185-
fi
186181
yum -y groupinstall development && sudo yum -y install curl wget jq
187182
188183
if [[ ${!OS} =~ ^centos ]]; then

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

Lines changed: 1 addition & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -49,8 +49,6 @@ phases:
4949
OS='alinux2'
5050
elif [ $(echo "${RELEASE}" | grep -w '^amzn\.2023') ]; then
5151
OS='alinux2023'
52-
elif [ $(echo "${RELEASE}" | grep '^centos\.7') ]; then
53-
OS='centos7'
5452
elif [ $(echo "${RELEASE}" | grep '^ubuntu\.20') ]; then
5553
OS='ubuntu2004'
5654
elif [ $(echo "${RELEASE}" | grep '^ubuntu\.22') ]; then
@@ -78,7 +76,7 @@ phases:
7876
which aws
7977
if [[ $? -ne 0 ]]; then
8078
echo "Installing unzip"
81-
if [[ "{{ test.OperatingSystemName.outputs.stdout }}" =~ ^(centos7|alinux|rhel|rocky) ]]; then
79+
if [[ "{{ test.OperatingSystemName.outputs.stdout }}" =~ ^(alinux|rhel|rocky) ]]; then
8280
yum -y install unzip
8381
elif [[ "{{ test.OperatingSystemName.outputs.stdout }}" =~ ^ubuntu ]]; then
8482
apt-get -y install unzip

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

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -38,8 +38,6 @@ phases:
3838
OS='alinux2'
3939
elif [ `echo "${RELEASE}" | grep -w '^amzn\.2023'` ]; then
4040
OS='alinux2023'
41-
elif [ `echo "${RELEASE}" | grep '^centos\.7'` ]; then
42-
OS='centos7'
4341
elif [ `echo "${RELEASE}" | grep '^ubuntu\.20'` ]; then
4442
OS='ubuntu2004'
4543
elif [ `echo "${RELEASE}" | grep '^ubuntu\.22'` ]; then

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

Lines changed: 0 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -38,8 +38,6 @@ phases:
3838
OS='alinux2'
3939
elif [ `echo "${RELEASE}" | grep -w '^amzn\.2023'` ]; then
4040
OS='alinux2023'
41-
elif [ `echo "${RELEASE}" | grep '^centos\.7'` ]; then
42-
OS='centos7'
4341
elif [ `echo "${RELEASE}" | grep '^ubuntu\.20'` ]; then
4442
OS='ubuntu2004'
4543
elif [ `echo "${RELEASE}" | grep '^ubuntu\.22'` ]; then
@@ -328,12 +326,6 @@ phases:
328326
set -vx
329327
OS='{{ validate.OperatingSystemName.outputs.stdout }}'
330328
331-
if [ {{ validate.LustreSupported.outputs.stdout }} == true ]; then
332-
echo "Checking for Lustre client..."
333-
if [ ${OS} == centos7 ]; then
334-
rpm -qa | grep lustre-client
335-
fi
336-
fi
337329
[[ $? -ne 0 ]] && echo "Check for Lustre client failed" && exit 1
338330
echo "FSx Lustre test passed"
339331

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

Lines changed: 5 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -10,7 +10,7 @@ constants:
1010
phases:
1111
- name: build
1212
steps:
13-
# Check input base AMI OS and get OS information, the output should be like centos.7 | amzn.2 | ubuntu.20.04 | ubuntu.22.04 | rhel.8.7 | rocky.8.8
13+
# Check input base AMI OS and get OS information, the output should be like amzn.2 | ubuntu.20.04 | ubuntu.22.04 | rhel.8.7 | rocky.8.8
1414
- name: OperatingSystemRelease
1515
action: ExecuteBash
1616
inputs:
@@ -39,8 +39,6 @@ phases:
3939
OS='alinux2'
4040
elif [ `echo "${!RELEASE}" | grep -w '^amzn\.2023'` ]; then
4141
OS='alinux2023'
42-
elif [ `echo "${!RELEASE}" | grep '^centos\.7'` ]; then
43-
OS='centos7'
4442
elif [ `echo "${!RELEASE}" | grep '^ubuntu\.20'` ]; then
4543
OS='ubuntu2004'
4644
elif [ `echo "${!RELEASE}" | grep '^ubuntu\.22'` ]; then
@@ -90,10 +88,10 @@ phases:
9088
exit {{ FailExitCode }}
9189
fi
9290
93-
# This component only supports aarch64 CPUs on Amazon Linux 2, Ubuntu2004, Ubuntu2204, Centos7, RHEL8, Rocky8, RHEL9 and Rocky9
91+
# This component only supports aarch64 CPUs on Amazon Linux 2, Ubuntu2004, Ubuntu2204, RHEL8, Rocky8, RHEL9 and Rocky9
9492
ARCH=$(uname -m)
9593
if [[ `echo ${!ARCH}` == 'aarch64' ]]; then
96-
if [ `echo "${!RELEASE}" | grep -Ev '^(amzn\.2|centos\.7|ubuntu\.20\.04|ubuntu\.22\.04|rhel\.8|rocky\.8|rhel\.9|rocky\.9)'` ]; then
94+
if [ `echo "${!RELEASE}" | grep -Ev '^(amzn\.2|ubuntu\.20\.04|ubuntu\.22\.04|rhel\.8|rocky\.8|rhel\.9|rocky\.9)'` ]; then
9795
echo "This component does not support '${!RELEASE}' on ARM64 CPUs. Failing build."
9896
exit {{ FailExitCode }}
9997
fi
@@ -155,9 +153,6 @@ phases:
155153
PLATFORM='{{ build.PlatformName.outputs.stdout }}'
156154
157155
if [[ ${!PLATFORM} == RHEL ]]; then
158-
if [[ ${!OS} == centos7 ]]; then
159-
yum -y install epel-release
160-
fi
161156
yum -y install jq
162157
elif [[ ${!PLATFORM} == DEBIAN ]]; then
163158
apt-get -y install jq
@@ -205,7 +200,7 @@ phases:
205200
# listing all the packages because wildcard does not work as expected
206201
yum versionlock kernel kernel-core kernel-modules
207202
208-
if [[ ${!OS} == "centos7" ]] || [[ ${!OS} == "alinux2" ]] || [[ ${!OS} == "alinux2023" ]] ; then
203+
if [[ ${!OS} == "alinux2" ]] || [[ ${!OS} == "alinux2023" ]] ; then
209204
yum versionlock kernel-abi-whitelists
210205
else
211206
yum versionlock kernel-abi-stablelists
@@ -300,7 +295,7 @@ phases:
300295
if [[ ${!DISABLE_KERNEL_UPDATE} == true ]] && [[ ${!PLATFORM} == RHEL ]]; then
301296
yum versionlock delete kernel kernel-core kernel-modules
302297
303-
if [[ ${!OS} == "centos7" ]] || [[ ${!OS} == "alinux2" ]] || [[ ${!OS} == "alinux2023" ]] ; then
298+
if [[ ${!OS} == "alinux2" ]] || [[ ${!OS} == "alinux2023" ]] ; then
304299
yum versionlock delete kernel-abi-whitelists
305300
else
306301
yum versionlock delete kernel-abi-stablelists

0 commit comments

Comments
 (0)