From 2f2f21d7c0a9f2e8978aeb0c0308822cf8e30d5c Mon Sep 17 00:00:00 2001 From: Julia Kreger Date: Mon, 10 Feb 2020 11:05:41 -0800 Subject: [PATCH] SW RAID: Delete root device hint The default root device hint can be retained and influence nodes upon later test jobs. Since this is not a required piece of configuration for non-raid jobs, we should go ahead and unset the value. Change-Id: I1199bd817438dfefdd96199dc52f438b184ad9df --- .../tests/scenario/baremetal_standalone_manager.py | 5 +++++ .../tests/scenario/ironic_standalone/test_cleaning.py | 8 ++++++++ 2 files changed, 13 insertions(+) diff --git a/ironic_tempest_plugin/tests/scenario/baremetal_standalone_manager.py b/ironic_tempest_plugin/tests/scenario/baremetal_standalone_manager.py index 9948ca85..3605c288 100644 --- a/ironic_tempest_plugin/tests/scenario/baremetal_standalone_manager.py +++ b/ironic_tempest_plugin/tests/scenario/baremetal_standalone_manager.py @@ -602,6 +602,11 @@ class BaremetalStandaloneScenarioTest(BaremetalStandaloneManager): # So we only move the node to active (verifying deployment). self.set_node_to_active() + def remove_root_device_hint(self): + patch = [{'path': '/properties/root_device', + 'op': 'remove'}] + self.update_node(self.node['uuid'], patch=patch) + def rescue_unrescue(self): rescue_password = uuidutils.generate_uuid() self.rescue_node(self.node['uuid'], rescue_password) diff --git a/ironic_tempest_plugin/tests/scenario/ironic_standalone/test_cleaning.py b/ironic_tempest_plugin/tests/scenario/ironic_standalone/test_cleaning.py index eb0d4d24..ef74e017 100644 --- a/ironic_tempest_plugin/tests/scenario/ironic_standalone/test_cleaning.py +++ b/ironic_tempest_plugin/tests/scenario/ironic_standalone/test_cleaning.py @@ -106,6 +106,10 @@ class SoftwareRaidIscsi(bsm.BaremetalStandaloneScenarioTest): @utils.services('image', 'network') def test_software_raid(self): self.build_raid_and_verify_node() + # NOTE(TheJulia): tearing down/terminating the instance does not + # remove the root device hint, so it is best for us to go ahead + # and remove it before exiting the test. + self.remove_root_device_hint() class SoftwareRaidDirect(bsm.BaremetalStandaloneScenarioTest): @@ -138,3 +142,7 @@ class SoftwareRaidDirect(bsm.BaremetalStandaloneScenarioTest): @utils.services('image', 'network') def test_software_raid(self): self.build_raid_and_verify_node() + # NOTE(TheJulia): tearing down/terminating the instance does not + # remove the root device hint, so it is best for us to go ahead + # and remove it before exiting the test. + self.remove_root_device_hint()