]> git-server-git.apps.pok.os.sepia.ceph.com Git - teuthology.git/commitdiff
suite: Check all images used by the cephadm task container-images 2104/head
authorZack Cerza <zack@cerza.org>
Thu, 6 Nov 2025 23:27:04 +0000 (16:27 -0700)
committerZack Cerza <zack@cerza.org>
Thu, 6 Nov 2025 23:27:04 +0000 (16:27 -0700)
Signed-off-by: Zack Cerza <zack@cerza.org>
teuthology/suite/run.py

index a9ffa212e40f7a90f331aabc28053b9b2283579c..f2392335af444b155fed07edcfae3dbba00c69d0 100644 (file)
@@ -25,7 +25,7 @@ from teuthology.suite import util
 from teuthology.suite.merge import config_merge
 from teuthology.suite.build_matrix import build_matrix
 from teuthology.suite.placeholder import substitute_placeholders, dict_templ
-from teuthology.util.containers import container_image_for_hash
+from teuthology.util.containers import container_image_for_hash, container_image_exists
 from teuthology.util.time import parse_offset, parse_timestamp, TIMESTAMP_FMT
 
 log = logging.getLogger(__name__)
@@ -550,15 +550,22 @@ class Run(object):
                     # no point in continuing the search
                     if newest:
                         return jobs_missing_packages, []
-                job_tasks = set()
                 for task_dict in parsed_yaml.get('tasks', []):
                     for key in task_dict.keys():
-                        job_tasks.add(key)
-                if any(['cephadm' in name for name in job_tasks]):
-                    if not container_image_for_hash(sha1):
-                        jobs_missing_packages.append(job)
-                        if newest:
-                            return jobs_missing_packages, []
+                        if 'cephadm' in key:
+                            # Check for our default image
+                            if not container_image_for_hash(sha1):
+                                jobs_missing_packages.append(job)
+                                if newest:
+                                    return jobs_missing_packages, []
+                        if key == 'cephadm':
+                            if image := (task_dict.get(key) or {}).get('image'):
+                                # Check each image that the job would use
+                                if not container_image_exists(image):
+                                    log.error(f"Required container image missing: {image}")
+                                    jobs_missing_packages.append(job)
+                                    if newest:
+                                        return jobs_missing_packages, []
 
             jobs_to_schedule.append(job)
         return jobs_missing_packages, jobs_to_schedule