From: Zack Cerza Date: Thu, 6 Nov 2025 23:27:04 +0000 (-0700) Subject: suite: Check all images used by the cephadm task X-Git-Url: http://git-server-git.apps.pok.os.sepia.ceph.com/?a=commitdiff_plain;h=refs%2Fheads%2Fcontainer-images;p=teuthology.git suite: Check all images used by the cephadm task Signed-off-by: Zack Cerza --- diff --git a/teuthology/suite/run.py b/teuthology/suite/run.py index a9ffa212e..f2392335a 100644 --- a/teuthology/suite/run.py +++ b/teuthology/suite/run.py @@ -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