From: Dan Mick Date: Fri, 12 Dec 2025 21:20:33 +0000 (-0800) Subject: maas: add hack to search for centos stream image X-Git-Url: http://git-server-git.apps.pok.os.sepia.ceph.com/?a=commitdiff_plain;h=9de3815e459c5c79bf3b5f99dc2c2883ae26978c;p=teuthology.git maas: add hack to search for centos stream image fog does this too. It's gross. Signed-off-by: Dan Mick --- diff --git a/teuthology/orchestra/opsys.py b/teuthology/orchestra/opsys.py index 614ec9f25..1c0ad86ca 100644 --- a/teuthology/orchestra/opsys.py +++ b/teuthology/orchestra/opsys.py @@ -46,7 +46,9 @@ DISTRO_CODENAME_MAP = { }, "centos": { "10": "stream", + "centos10-stream": "stream", "9": "stream", + "centos9-stream": "stream", "8": "core", "7": "core", "6": "core", diff --git a/teuthology/provision/maas.py b/teuthology/provision/maas.py index 3dfdffa13..c675e9ee4 100644 --- a/teuthology/provision/maas.py +++ b/teuthology/provision/maas.py @@ -213,6 +213,18 @@ class MAAS(object): major_machine_arch = self.arch.split('/')[0] if image["name"] == name and major_image_arch == major_machine_arch: return image + # hack: look for stream. This is the same as fog, but there + # really should be a better way + if self.os_type == 'centos': + # self.os_version is '.stream'. + os_version = self.os_version.split('.')[0] + name = f'centos/centos{os_version}-stream' + for image in resp: + major_image_arch = image["architecture"].split('/')[0] + major_machine_arch = self.arch.split('/')[0] + if image["name"] == name and major_image_arch == major_machine_arch: + return image + raise RuntimeError(f"MaaS has no {name} image for {major_machine_arch}. Available images: {self.suggest_image_names()}") def suggest_image_names(self):