From 9de3815e459c5c79bf3b5f99dc2c2883ae26978c Mon Sep 17 00:00:00 2001 From: Dan Mick Date: Fri, 12 Dec 2025 13:20:33 -0800 Subject: [PATCH] maas: add hack to search for centos stream image fog does this too. It's gross. Signed-off-by: Dan Mick --- teuthology/orchestra/opsys.py | 2 ++ teuthology/provision/maas.py | 12 ++++++++++++ 2 files changed, 14 insertions(+) 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): -- 2.47.3