Skip to content
Draft
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 2 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,8 @@ CHANGELOG
**ENHANCEMENTS**
- Improve cluster update resiliency on login nodes by reusing the head-node-driven orchestration already in place on compute nodes,
removing the dependency on cfn-hup and cfn-init.
- Add support for AlmaLinux 8 as a `CustomAmi` created through the `build-image` process. ParallelCluster does not
publish an official AlmaLinux 8 AMI.

**CHANGES**
- The validator `ClusterNameValidator` now enforces cluster names to be limited to 40 characters when using `ExternalSlurmdbd`,
Expand Down
18 changes: 15 additions & 3 deletions cli/src/pcluster/constants.py
Original file line number Diff line number Diff line change
Expand Up @@ -32,9 +32,18 @@
"rocky8",
"rhel9",
"rocky9",
"almalinux8",
]
UNSUPPORTED_OSES_FOR_MICRO_NANO = ["ubuntu2204", "ubuntu2404", "rhel8", "rocky8", "rhel9", "rocky9"]
UNSUPPORTED_OSES_FOR_P6E_GB200 = ["rhel8", "rocky8", "rhel9"]
UNSUPPORTED_OSES_FOR_MICRO_NANO = [
"ubuntu2204",
"ubuntu2404",
"rhel8",
"rocky8",
"rhel9",
"rocky9",
"almalinux8",
]
UNSUPPORTED_OSES_FOR_P6E_GB200 = ["rhel8", "rocky8", "rhel9", "almalinux8"]
SUPPORTED_OSES_FOR_P6E_GB200 = list(set(SUPPORTED_OSES) - set(UNSUPPORTED_OSES_FOR_P6E_GB200))
UNSUPPORTED_OSES_FOR_P6_B300 = []
SUPPORTED_OSES_FOR_P6_B300 = list(set(SUPPORTED_OSES) - set(UNSUPPORTED_OSES_FOR_P6_B300))
Expand Down Expand Up @@ -65,6 +74,7 @@
"rocky8": CR_PLATFORM_LINUX_UNIX,
"rhel9": CR_PLATFORM_RHEL,
"rocky9": CR_PLATFORM_LINUX_UNIX,
"almalinux8": CR_PLATFORM_LINUX_UNIX,
}

OS_MAPPING = {
Expand All @@ -75,6 +85,7 @@
"rocky8": {"user": "rocky"},
"rhel9": {"user": "ec2-user"},
"rocky9": {"user": "rocky"},
"almalinux8": {"user": "ec2-user"},
}

OS_TO_IMAGE_NAME_PART_MAP = {
Expand All @@ -85,9 +96,10 @@
"rocky8": "rocky8-hvm",
"rhel9": "rhel9-hvm",
"rocky9": "rocky9-hvm",
"almalinux8": "almalinux8-hvm",
}
# We do not publicly publish/release Parallelcluster AMI of below OSSes
PRIVATE_OSES = ["rocky8", "rocky9"]
PRIVATE_OSES = ["rocky8", "rocky9", "almalinux8"]

IMAGE_NAME_PART_TO_OS_MAP = {value: key for key, value in OS_TO_IMAGE_NAME_PART_MAP.items()}

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -30,6 +30,7 @@ phases:
rocky.8*) echo 'rocky8' ;;
rhel.9*) echo 'rhel9' ;;
rocky.9*) echo 'rocky9' ;;
almalinux.8*) echo 'almalinux8' ;;
*) echo "Unsupported OS: $RELEASE" && exit {{ FailExitCode }} ;;
esac

Expand All @@ -55,14 +56,14 @@ phases:
set -x
# Get OS info
. /etc/os-release
# 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
# Check input base AMI OS and get OS information, the output should be like amzn.2023 | ubuntu.22.04 | rhel.8.10 | rocky.8.10 | almalinux.8.10
RELEASE="${!ID}${!VERSION_ID:+.${!VERSION_ID}}"

# Use OS name from previous step
OS="{{ build.OperatingSystemName.outputs.stdout }}"

# Set platform
[[ $OS =~ ^(alinux|rhel|rocky) ]] && PLATFORM='RHEL' || PLATFORM='DEBIAN'
[[ $OS =~ ^(alinux|almalinux|rhel|rocky) ]] && PLATFORM='RHEL' || PLATFORM='DEBIAN'

# Set URLs
COOKBOOK_NAME="aws-parallelcluster-cookbook-${CfnParamCookbookVersion}"
Expand Down Expand Up @@ -139,6 +140,7 @@ phases:
yum versionlock ${!KERNEL_PACKAGES_PREFIX} ${!KERNEL_PACKAGES_PREFIX}-core ${!KERNEL_PACKAGES_PREFIX}-modules ${!KERNEL_PACKAGES_PREFIX}-modules-extra
[[ $OS =~ rocky ]] && yum versionlock rocky-release rocky-repos
[[ $OS =~ rhel ]] && yum versionlock redhat-release
[[ $OS == almalinux8 ]] && yum versionlock almalinux-release almalinux-repos
else
apt-get -y install linux-headers-$(uname -r) linux-modules-extra-$(uname -r)
apt-mark hold linux-aws linux-base linux-headers-aws linux-image-aws linux-modules-extra-aws
Expand Down Expand Up @@ -276,6 +278,7 @@ phases:
yum versionlock delete ${!KERNEL_PACKAGES_PREFIX} ${!KERNEL_PACKAGES_PREFIX}-core ${!KERNEL_PACKAGES_PREFIX}-modules ${!KERNEL_PACKAGES_PREFIX}-modules-extra
[[ $OS =~ rocky ]] && yum versionlock delete rocky-release rocky-repos
[[ $OS =~ rhel ]] && yum versionlock delete redhat-release
[[ $OS == almalinux8 ]] && yum versionlock delete almalinux-release almalinux-repos
else
apt-mark unhold linux-aws linux-base linux-headers-aws linux-image-aws linux-modules-extra-aws
fi
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -59,6 +59,8 @@ phases:
OS='rhel9'
elif [ $(echo "${RELEASE}" | grep '^rocky\.9') ]; then
OS='rocky9'
elif [ $(echo "${RELEASE}" | grep '^almalinux\.8') ]; then
OS='almalinux8'
fi

echo ${OS}
Expand All @@ -74,7 +76,7 @@ phases:
which aws
if [[ $? -ne 0 ]]; then
echo "Installing unzip"
if [[ "{{ test.OperatingSystemName.outputs.stdout }}" =~ ^(alinux|rhel|rocky) ]]; then
if [[ "{{ test.OperatingSystemName.outputs.stdout }}" =~ ^(alinux|almalinux|rhel|rocky) ]]; then
yum -y install unzip
elif [[ "{{ test.OperatingSystemName.outputs.stdout }}" =~ ^ubuntu ]]; then
apt-get -y install unzip
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -39,6 +39,7 @@ phases:
rocky.8*) echo rocky8;;
rhel.9*) echo rhel9;;
rocky.9*) echo rocky9;;
almalinux.8*) echo almalinux8;;
*) echo "Operating System '${RELEASE}' is not supported. Failing build." && exit 1;;
esac

Expand All @@ -62,7 +63,7 @@ phases:
- |
set -v
case '{{ test.OSName.outputs.stdout }}' in
alinux*|centos*|rhel*|rocky*) echo RHEL;;
alinux*|almalinux*|centos*|rhel*|rocky*) echo RHEL;;
ubuntu*) echo DEBIAN;;
esac

Expand Down Expand Up @@ -90,7 +91,7 @@ phases:
set -v
ARCHITECTURE='{{ test.OSArchitecture.outputs.stdout }}'
OS='{{ test.OSName.outputs.stdout }}'
if [ ${ARCHITECTURE} == 'arm64' ] && [[ ${OS} =~ ^(ubuntu(20|22)04|alinux(2|2023)|rhel8|rocky8|rhel9|rocky9)$ ]] || [ ${ARCHITECTURE} == 'x86_64' ]; then
if [ ${ARCHITECTURE} == 'arm64' ] && [[ ${OS} =~ ^(ubuntu(20|22)04|alinux(2|2023)|rhel8|rocky8|rhel9|rocky9|almalinux8)$ ]] || [ ${ARCHITECTURE} == 'x86_64' ]; then
echo "true"
else
echo "false"
Expand Down Expand Up @@ -393,4 +394,4 @@ phases:
cd /etc/chef/cookbooks/{{ loop.value }}
inspec exec test --profiles-path . --controls /tag:install/ /tag:testami/ --no-distinct-exit
[[ $? -ne 0 ]] && echo "InSpec tests failed: {{ loop.value }}" && exit 1
echo "InSpec tests passed: {{ loop.value }}"
echo "InSpec tests passed: {{ loop.value }}"
18 changes: 12 additions & 6 deletions cli/src/pcluster/resources/imagebuilder/update_and_reboot.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@ constants:
phases:
- name: build
steps:
# 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
# Check input base AMI OS and get OS information, the output should be like amzn.2023 | ubuntu.22.04 | rhel.8.10 | rocky.8.10 | almalinux.8.10
- name: OperatingSystemRelease
action: ExecuteBash
inputs:
Expand Down Expand Up @@ -49,6 +49,8 @@ phases:
OS='rhel9'
elif [ `echo "${!RELEASE}" | grep '^rocky\.9'` ]; then
OS='rocky9'
elif [ `echo "${!RELEASE}" | grep '^almalinux\.8'` ]; then
OS='almalinux8'
else
echo "Operating System '${!RELEASE}' is not supported. Failing build."
exit {{ FailExitCode }}
Expand All @@ -65,7 +67,7 @@ phases:
set -x
OS='{{ build.OperatingSystemName.outputs.stdout }}'

if [ `echo "${!OS}" | grep -E '^(alinux|rhel|rocky)'` ]; then
if [ `echo "${!OS}" | grep -E '^(alinux|almalinux|rhel|rocky)'` ]; then
PLATFORM='RHEL'
elif [ `echo "${!OS}" | grep -E '^ubuntu'` ]; then
PLATFORM='DEBIAN'
Expand All @@ -81,15 +83,15 @@ phases:
- |
set -x
RELEASE='{{ build.OperatingSystemRelease.outputs.stdout }}'
if [ `echo "${!RELEASE}" | grep -Ev '^(amzn|ubuntu|rhel|rocky)'` ]; then
if [ `echo "${!RELEASE}" | grep -Ev '^(amzn|ubuntu|rhel|rocky|almalinux)'` ]; then
echo "This component does not support '${!RELEASE}'. Failing build."
exit {{ FailExitCode }}
fi

# This component only supports aarch64 CPUs on Amazon Linux 2, Ubuntu2204, RHEL8, Rocky8, RHEL9 and Rocky9
# This component supports aarch64 CPUs on Amazon Linux 2023, Ubuntu, RHEL, Rocky Linux, and AlmaLinux 8
ARCH=$(uname -m)
if [[ `echo ${!ARCH}` == 'aarch64' ]]; then
if [ `echo "${!RELEASE}" | grep -Ev '^(amzn\.2|ubuntu\.20\.04|ubuntu\.22\.04|ubuntu\.24\.04|rhel\.8|rocky\.8|rhel\.9|rocky\.9)'` ]; then
if [ `echo "${!RELEASE}" | grep -Ev '^(amzn\.2023|ubuntu\.22\.04|ubuntu\.24\.04|rhel\.8|rocky\.8|rhel\.9|rocky\.9|almalinux\.8)'` ]; then
echo "This component does not support '${!RELEASE}' on ARM64 CPUs. Failing build."
exit {{ FailExitCode }}
fi
Expand Down Expand Up @@ -179,6 +181,8 @@ phases:
yum versionlock rocky-release rocky-repos
elif [[ ${!OS} == "rhel8" ]] || [[ ${!OS} == "rhel9" ]] ; then
yum versionlock redhat-release
elif [[ ${!OS} == "almalinux8" ]] ; then
yum versionlock almalinux-release almalinux-repos
fi
echo "Kernel version locked"
fi
Expand All @@ -197,7 +201,7 @@ phases:
if [[ ${!PLATFORM} == RHEL ]]; then
yum -y update

if [[ ${!OS} == "rhel8" ]] || [[ ${!OS} == "rocky8" ]] || [[ ${!OS} == "rhel9" ]] || [[ ${!OS} == "rocky9" ]] || [[ ${!OS} == "alinux2023" ]] ; then
if [[ ${!OS} == "rhel8" ]] || [[ ${!OS} == "rocky8" ]] || [[ ${!OS} == "rhel9" ]] || [[ ${!OS} == "rocky9" ]] || [[ ${!OS} == "almalinux8" ]] || [[ ${!OS} == "alinux2023" ]] ; then
# package-cleanup has changed in RHEL8 and it works differently https://access.redhat.com/solutions/1227
yum remove -y $(yum repoquery --installonly --latest-limit=-2 -q)
else
Expand Down Expand Up @@ -243,6 +247,8 @@ phases:
yum versionlock delete rocky-release
elif [[ ${!OS} == "rhel8" ]] || [[ ${!OS} == "rhel9" ]] ; then
yum versionlock delete redhat-release
elif [[ ${!OS} == "almalinux8" ]] ; then
yum versionlock delete almalinux-release almalinux-repos
fi
echo "Kernel version unlocked"
fi
Expand Down
4 changes: 3 additions & 1 deletion cli/src/pcluster/templates/cw_dashboard_builder.py
Original file line number Diff line number Diff line change
Expand Up @@ -746,7 +746,9 @@ def _add_cw_log(self):
[
self._new_cw_log_widget(
title="system-messages",
conditions=[Condition(["alinux2023", "rhel8", "rocky8", "rhel9", "rocky9"], base_os)],
conditions=[
Condition(["alinux2023", "rhel8", "rocky8", "rhel9", "rocky9", "almalinux8"], base_os)
],
filters=[self._new_filter(pattern=f"{head_private_ip}.*system-messages")],
),
self._new_cw_log_widget(
Expand Down
5 changes: 4 additions & 1 deletion cli/src/pcluster/validators/cluster_validators.py
Original file line number Diff line number Diff line change
Expand Up @@ -51,7 +51,10 @@
SHARED_STORAGE_NAME_MAX_LENGTH = 30
NAME_REGEX = r"^[a-z][a-z0-9\-]*$"

EFA_UNSUPPORTED_ARCHITECTURES_OSES = {"x86_64": [], "arm64": []}
EFA_UNSUPPORTED_ARCHITECTURES_OSES = {
"x86_64": ["almalinux8"],
"arm64": ["almalinux8"],
}

EFS_MESSAGES = {
"errors": {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -36,6 +36,7 @@ Allowed values for Operating System:
5. rocky8
6. rhel9
7. rocky9
8. almalinux8
The EC2 instance selected supports enhanced networking capabilities using Elastic Fabric Adapter (EFA). EFA enables you to run applications requiring high levels of inter-node communications at scale on AWS at no additional charge (https://docs.aws.amazon.com/parallelcluster/latest/ug/efa-v3.html).
Allowed values for VPC ID:
# id name number_of_subnets
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -36,6 +36,7 @@ Allowed values for Operating System:
5. rocky8
6. rhel9
7. rocky9
8. almalinux8
Allowed values for VPC ID:
# id name number_of_subnets
--- ------------ --------------------------------- -------------------
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -36,6 +36,7 @@ Allowed values for Operating System:
5. rocky8
6. rhel9
7. rocky9
8. almalinux8
The EC2 instance selected supports enhanced networking capabilities using Elastic Fabric Adapter (EFA). EFA enables you to run applications requiring high levels of inter-node communications at scale on AWS at no additional charge (https://docs.aws.amazon.com/parallelcluster/latest/ug/efa-v3.html).
Enabling EFA requires compute instances to be placed within a Placement Group. Please specify an existing Placement Group name or leave it blank for ParallelCluster to create one.
Allowed values for VPC ID:
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -36,6 +36,7 @@ Allowed values for Operating System:
5. rocky8
6. rhel9
7. rocky9
8. almalinux8
The EC2 instance selected supports enhanced networking capabilities using Elastic Fabric Adapter (EFA). EFA enables you to run applications requiring high levels of inter-node communications at scale on AWS at no additional charge (https://docs.aws.amazon.com/parallelcluster/latest/ug/efa-v3.html).
Enabling EFA requires compute instances to be placed within a Placement Group. Please specify an existing Placement Group name or leave it blank for ParallelCluster to create one.
Allowed values for VPC ID:
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -36,6 +36,7 @@ Allowed values for Operating System:
5. rocky8
6. rhel9
7. rocky9
8. almalinux8
The EC2 instance selected supports enhanced networking capabilities using Elastic Fabric Adapter (EFA). EFA enables you to run applications requiring high levels of inter-node communications at scale on AWS at no additional charge (https://docs.aws.amazon.com/parallelcluster/latest/ug/efa-v3.html).
Enabling EFA requires compute instances to be placed within a Placement Group. Please specify an existing Placement Group name or leave it blank for ParallelCluster to create one.
ERROR: non-existent-test-pg is not an acceptable value for Placement Group name
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -36,6 +36,7 @@ Allowed values for Operating System:
5. rocky8
6. rhel9
7. rocky9
8. almalinux8
Allowed values for VPC ID:
# id name number_of_subnets
--- ------------ --------------------------------- -------------------
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -36,6 +36,7 @@ Allowed values for Operating System:
5. rocky8
6. rhel9
7. rocky9
8. almalinux8
Allowed values for VPC ID:
# id name number_of_subnets
--- ------------ --------------------------------- -------------------
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -36,6 +36,7 @@ Allowed values for Operating System:
5. rocky8
6. rhel9
7. rocky9
8. almalinux8
Allowed values for VPC ID:
# id name number_of_subnets
--- ------------ --------------------------------- -------------------
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -36,6 +36,7 @@ Allowed values for Operating System:
5. rocky8
6. rhel9
7. rocky9
8. almalinux8
Allowed values for VPC ID:
# id name number_of_subnets
--- ------------ --------------------------------- -------------------
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -36,6 +36,7 @@ Allowed values for Operating System:
5. rocky8
6. rhel9
7. rocky9
8. almalinux8
Allowed values for VPC ID:
# id name number_of_subnets
--- ------------ --------------------------------- -------------------
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -36,6 +36,7 @@ Allowed values for Operating System:
5. rocky8
6. rhel9
7. rocky9
8. almalinux8
Allowed values for Availability Zone:
1. eu-west-1a
2. eu-west-1b
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -36,6 +36,7 @@ Allowed values for Operating System:
5. rocky8
6. rhel9
7. rocky9
8. almalinux8
There are no VPC for the given region. Starting automatic creation of VPC and subnets...
Allowed values for Availability Zone:
1. eu-west-1a
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -36,6 +36,7 @@ Allowed values for Operating System:
5. rocky8
6. rhel9
7. rocky9
8. almalinux8
There are no VPC for the given region. Starting automatic creation of VPC and subnets...
Allowed values for Availability Zone:
1. eu-west-1a
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -19,6 +19,7 @@ Allowed values for Operating System:
5. rocky8
6. rhel9
7. rocky9
8. almalinux8
Allowed values for VPC ID:
# id name number_of_subnets
--- ------------ --------------------------------- -------------------
Expand Down
4 changes: 4 additions & 0 deletions cli/tests/pcluster/schemas/test_cluster_schema.py
Original file line number Diff line number Diff line change
Expand Up @@ -69,6 +69,7 @@ def test_cluster_schema_slurm(mocker, test_datadir, config_file_name):
(None, None, "Missing data for required field"),
("ubuntu2204", "ami-12345678", None),
("alinux2023", None, None),
("almalinux8", "ami-12345678", None),
],
)
def test_image_schema(os, custom_ami, failure_message):
Expand All @@ -85,6 +86,9 @@ def test_image_schema(os, custom_ami, failure_message):
image = ImageSchema().load(image_schema)
assert_that(image.os).is_equal_to(os)
assert_that(image.custom_ami).is_equal_to(custom_ami)
output_schema = ImageSchema()
output_schema.context = {"delete_defaults_when_dump": True}
assert_that(output_schema.dump(image)).is_equal_to(image_schema)


@pytest.mark.parametrize(
Expand Down
Loading