From a41979ee8386ff7cc286b7c108aa93decf4f3b1f Mon Sep 17 00:00:00 2001 From: Julia Kreger Date: Wed, 15 May 2024 11:38:22 -0700 Subject: [PATCH] Exclude ramdisk tests with tinycore in uefi mode Tinycore artifacts are not uefi bootable unless the firmware jumps back to bios booting the node. This presents with ramdisk tests when a node may end up using the tinycore linux iso image if a boot iso cannot be reliably built in Ironic's CI due to CI resource provider constraints. Instead, we now will just skip the test if we detect this case. Closes-Bug: 2065811 Change-Id: Iae0ba6a52aa81f02202da768d4f755469badfe33 --- .../tests/scenario/baremetal_standalone_manager.py | 11 +++++++++++ 1 file changed, 11 insertions(+) diff --git a/ironic_tempest_plugin/tests/scenario/baremetal_standalone_manager.py b/ironic_tempest_plugin/tests/scenario/baremetal_standalone_manager.py index 48a6bd5b..01289ced 100644 --- a/ironic_tempest_plugin/tests/scenario/baremetal_standalone_manager.py +++ b/ironic_tempest_plugin/tests/scenario/baremetal_standalone_manager.py @@ -935,6 +935,17 @@ class BaremetalStandaloneScenarioTest(BaremetalStandaloneManager): def boot_and_verify_ramdisk_node(self, ramdisk_ref=None, iso=False, should_succeed=True): + node = self.get_node(node_id=self.node['uuid']) + node_capabilities = node['properties'].get('capabilities', '') + if (ramdisk_ref and 'tinycore' in ramdisk_ref.lower() + and ('boot_mode:uefi' in node_capabilities + or 'uefi' in node.get('boot_mode', 'None'))): + # Checks the top level field if the API gives it to us, i.e. + # the test version supports it, and the lower level original + # properties field which upstream CI populates. + raise self.skipException('Skipping ramdisk test as tinycore ' + 'cannot be booted in UEFI mode.') + self.boot_node_ramdisk(ramdisk_ref, iso) self.assertTrue(self.ping_ip_address(self.node_ip, should_succeed=should_succeed))