Skip to content

Commit 2495198

Browse files
committed
[Test] In test_build_image, when Os is Rocky9, use the vanilla AMI, update packages. This is because we want to guarantee that we work on the latest version of Rocky9. As a consequence, we need to disable the installation of Lustre for this test case (as we do for other OSes) because we cannot guarantee that Lustre releases the client on time with the updated version, and we want the test to be decoupled from it.
1 parent 52b58f4 commit 2495198

File tree

1 file changed

+5
-3
lines changed

1 file changed

+5
-3
lines changed

tests/integration-tests/tests/createami/test_createami.py

Lines changed: 5 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -132,7 +132,7 @@ def test_build_image(
132132
# Test Deep Learning AMIs
133133
base_ami = retrieve_latest_ami(region, os, ami_type="remarkable", architecture=architecture)
134134
enable_nvidia = False # Deep learning AMIs have Nvidia pre-installed
135-
elif "rhel" in os or "rocky" in os or "ubuntu" in os:
135+
elif "rhel" in os or "ubuntu" in os or os == "rocky8":
136136
# Test AMIs from first stage build. Because RHEL/Rocky and Ubuntu have specific requirement of kernel versions.
137137
try:
138138
base_ami = retrieve_latest_ami(region, os, ami_type="first_stage", architecture=architecture)
@@ -141,12 +141,14 @@ def test_build_image(
141141
logging.info("First stage AMI not available, using official AMI instead.")
142142
base_ami = retrieve_latest_ami(region, os, ami_type="official", architecture=architecture)
143143
update_os_packages = True
144-
if os in ["ubuntu2204", "rhel9", "rocky9"]:
144+
if os in ["ubuntu2204", "rhel9"]:
145145
enable_lustre_client = False
146146
else:
147147
# Test vanilla AMIs.
148148
base_ami = retrieve_latest_ami(region, os, ami_type="official", architecture=architecture)
149-
if os in ["alinux2", "alinux2023"]:
149+
if os in ["rocky9"]:
150+
enable_lustre_client = False
151+
if os in ["alinux2", "alinux2023", "rocky9"]:
150152
update_os_packages = True
151153
image_config = pcluster_config_reader(
152154
config_file="image.config.yaml",

0 commit comments

Comments
 (0)