Merge "SW RAID: Delete root device hint"

This commit is contained in:
Zuul 2020-02-14 18:17:36 +00:00 committed by Gerrit Code Review
commit 84fe6671e4
2 changed files with 13 additions and 0 deletions

View File

@ -602,6 +602,11 @@ class BaremetalStandaloneScenarioTest(BaremetalStandaloneManager):
# So we only move the node to active (verifying deployment). # So we only move the node to active (verifying deployment).
self.set_node_to_active() 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): def rescue_unrescue(self):
rescue_password = uuidutils.generate_uuid() rescue_password = uuidutils.generate_uuid()
self.rescue_node(self.node['uuid'], rescue_password) self.rescue_node(self.node['uuid'], rescue_password)

View File

@ -106,6 +106,10 @@ class SoftwareRaidIscsi(bsm.BaremetalStandaloneScenarioTest):
@utils.services('image', 'network') @utils.services('image', 'network')
def test_software_raid(self): def test_software_raid(self):
self.build_raid_and_verify_node() 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): class SoftwareRaidDirect(bsm.BaremetalStandaloneScenarioTest):
@ -138,3 +142,7 @@ class SoftwareRaidDirect(bsm.BaremetalStandaloneScenarioTest):
@utils.services('image', 'network') @utils.services('image', 'network')
def test_software_raid(self): def test_software_raid(self):
self.build_raid_and_verify_node() 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()