[Test] Stabilize test_build_image_no_internet. - #7600
Conversation
…e OS updates and Lustre installation. The test is now aligned to what the test build_image does: for ubuntu2204, ubuntu2404 and rhel9 the OS updates are enabled and the lustre client installation is disabled.
When ubuntu2204 is used, the test uses the DLAMI Ubu2204.
| # Use official AMIs. First stage AMIs must not be used as parent image in this test. | ||
| base_ami = retrieve_latest_ami(region, os, ami_type="official", architecture=architecture) | ||
| update_os_packages = True | ||
| if os in ["ubuntu2204", "rhel9", "ubuntu2404"]: |
There was a problem hiding this comment.
Notes for the reviewer
Removing ubuntu2204 here is safe and correct because that case is covered by the if condition above. This is to cleanup the condition and avoid misudnerstandings.
if os in ["ubuntu2204"]:
# Test Deep Learning AMIs
| Iam: | ||
| AdditionalIamPolicies: | ||
| - Policy: arn:{{ partition }}:iam::aws:policy/AmazonS3ReadOnlyAccess | ||
| UpdateOsPackages: |
There was a problem hiding this comment.
Notes for the reviewer
The build config w/o internet is now aligned to the build config w/ internet where we can control the UpdateOs and LustreClient from the test code.
| echo "Capping kernel to the max FSx Lustre-supported version: ${cap}" | ||
| sudo dnf install -y python3-dnf-plugin-versionlock | ||
| sudo dnf versionlock add "kernel-${cap}" "kernel-core-${cap}" "kernel-modules-${cap}" | ||
| sudo dnf versionlock add "kernel-${cap}" "kernel-core-${cap}" "kernel-modules-${cap}" "kernel-modules-core-${cap}" "kernel-tools-${cap}" |
There was a problem hiding this comment.
Notes for the reviewer
Experimentally proven that with these additional pinning, no kernel package can escape the pinning.
[root@ip-27-6-28-180 ~]# sudo dnf versionlock list
Updating Subscription Management repositories.
Unable to read consumer identity
This system is not registered with an entitlement server. You can use "rhc" or "subscription-manager" to register.
Last metadata expiration check: 0:10:13 ago on Wed 02 Sep 2026 08:04:52 PM UTC.
kernel-0:5.14.0-570.123.1.el9_6.*
kernel-core-0:5.14.0-570.123.1.el9_6.*
kernel-modules-0:5.14.0-570.123.1.el9_6.*
kernel-modules-core-0:5.14.0-570.123.1.el9_6.*
kernel-tools-0:5.14.0-570.123.1.el9_6.*
[root@ip-27-6-28-180 ~]# sudo dnf update --assumeno 2>&1 | grep -E '^ (kernel)' | awk '{print $1, $3}'
[root@ip-27-6-28-180 ~]#
| LOGIN_NODE: ["tls"], | ||
| }, | ||
| # Kernel modules that must be loaded on every node type, both before and after patching. | ||
| COMMON_MANDATORY_KERNEL_MODULES = [ |
There was a problem hiding this comment.
Notes for the reviewer
With this change we do not need to add new kernel modules to the list of LAZY_KERNEL_MODULES whenever we observe a false alarm on those. Instead we verify the things we are actually interested on: the mandatory kernel modules we are in control of.
7f95f80 to
09e0297
Compare
…ilure message to facilitate troubleshooting.
09e0297 to
fbfe4dc
Compare
…and disable unattended upgrades. This is meant to prevent failures in Proxy and ProxyClient bootstrap caused by boot-time upgrades holding the dpkg lock.
Codecov Report✅ All modified and coverable lines are covered by tests. Additional details and impacted files@@ Coverage Diff @@
## develop #7600 +/- ##
========================================
Coverage 90.07% 90.07%
========================================
Files 180 180
Lines 16410 16410
========================================
Hits 14782 14782
Misses 1628 1628
Flags with carried forward coverage won't be shown. Click here to find out more. ☔ View full report in Codecov by Harness. 🚀 New features to boost your workflow:
|
Description of changes
Stabilize
test_build_image_no_internet: align the build image config to the one used intest_build_image(with internet), where lustre installation is disabled on ubuntu2404. The test was not honoring this configuration because it missed the parameter to disable lustre. With this change we can drive the test to conclusion at the cost of not covering the case of ubu24 with lustre enabled. Now the test without internet covers the same of build-image with internet barring the proxied env.Future improvements for
test_build_image_no_internetandtest_build_image: we must increase the coverage so that we cover all the combinations of update OS and Lustre instalation.Tests
ONGOING:
By submitting this pull request, I confirm that my contribution is made under the terms of the Apache 2.0 license.