Merge "Stop removing root uuid in vendor interfaces"
This commit is contained in:
commit
cff1ea73b7
@ -566,11 +566,6 @@ class IloVirtualMediaBoot(base.BootInterface):
|
||||
else:
|
||||
_clean_up_boot_iso_for_instance(task.node)
|
||||
driver_internal_info.pop('boot_iso_created_in_web_server', None)
|
||||
# Need to retain 'root_uuid_or_disk_id' during rescue. It would
|
||||
# be required if boot iso needs to be created during unrescue
|
||||
# operation.
|
||||
if task.node.provision_state != states.RESCUING:
|
||||
driver_internal_info.pop('root_uuid_or_disk_id', None)
|
||||
ilo_common.cleanup_vmedia_boot(task)
|
||||
task.node.driver_internal_info = driver_internal_info
|
||||
task.node.save()
|
||||
|
@ -1047,14 +1047,6 @@ class IRMCVirtualMediaBoot(base.BootInterface, IRMCVolumeBootMixIn):
|
||||
driver_internal_info = task.node.driver_internal_info
|
||||
driver_internal_info.pop('irmc_boot_iso', None)
|
||||
|
||||
# When rescue, this function is called. But we need to retain the
|
||||
# root_uuid_or_disk_id to use on unrescue (see prepare_instance).
|
||||
boot_local_or_iwdi = (
|
||||
deploy_utils.get_boot_option(task.node) == "local" or
|
||||
driver_internal_info.get('is_whole_disk_image'))
|
||||
if task.node.provision_state != states.RESCUING or boot_local_or_iwdi:
|
||||
driver_internal_info.pop('root_uuid_or_disk_id', None)
|
||||
|
||||
task.node.driver_internal_info = driver_internal_info
|
||||
task.node.save()
|
||||
_cleanup_vmedia_boot(task)
|
||||
|
@ -900,10 +900,8 @@ class IloVirtualMediaBootTestCase(db_base.DbTestCase):
|
||||
is_iscsi_boot_mock):
|
||||
with task_manager.acquire(self.context, self.node.uuid,
|
||||
shared=False) as task:
|
||||
root_uuid = "12312642-09d3-467f-8e09-12385826a123"
|
||||
driver_internal_info = task.node.driver_internal_info
|
||||
driver_internal_info['boot_iso_created_in_web_server'] = False
|
||||
driver_internal_info['root_uuid_or_disk_id'] = root_uuid
|
||||
task.node.driver_internal_info = driver_internal_info
|
||||
task.node.save()
|
||||
is_iscsi_boot_mock.return_value = False
|
||||
@ -913,11 +911,6 @@ class IloVirtualMediaBootTestCase(db_base.DbTestCase):
|
||||
driver_internal_info = task.node.driver_internal_info
|
||||
self.assertNotIn('boot_iso_created_in_web_server',
|
||||
driver_internal_info)
|
||||
if task.node.provision_state != states.RESCUING:
|
||||
self.assertNotIn('root_uuid_or_disk_id', driver_internal_info)
|
||||
else:
|
||||
self.assertEqual(root_uuid,
|
||||
driver_internal_info['root_uuid_or_disk_id'])
|
||||
node_power_mock.assert_called_once_with(task,
|
||||
states.POWER_OFF)
|
||||
update_secure_boot_mode_mock.assert_called_once_with(task, False)
|
||||
@ -980,7 +973,6 @@ class IloVirtualMediaBootTestCase(db_base.DbTestCase):
|
||||
driver_internal_info = task.node.driver_internal_info
|
||||
self.assertNotIn('boot_iso_created_in_web_server',
|
||||
driver_internal_info)
|
||||
self.assertNotIn('root_uuid_or_disk_id', driver_internal_info)
|
||||
node_power_mock.assert_called_once_with(task,
|
||||
states.POWER_OFF)
|
||||
update_secure_boot_mode_mock.assert_called_once_with(task, False)
|
||||
|
@ -1106,8 +1106,6 @@ class IRMCVirtualMediaBootTestCase(db_base.DbTestCase):
|
||||
shared=False) as task:
|
||||
task.node.instance_info['irmc_boot_iso'] = 'glance://deploy_iso'
|
||||
task.node.driver_internal_info['irmc_boot_iso'] = 'irmc_boot.iso'
|
||||
task.node.driver_internal_info = {'root_uuid_or_disk_id': (
|
||||
"12312642-09d3-467f-8e09-12385826a123")}
|
||||
|
||||
task.driver.boot.clean_up_instance(task)
|
||||
|
||||
@ -1115,8 +1113,6 @@ class IRMCVirtualMediaBootTestCase(db_base.DbTestCase):
|
||||
irmc_boot._get_iso_name(task.node, label='boot'))
|
||||
self.assertNotIn('irmc_boot_iso',
|
||||
task.node.driver_internal_info)
|
||||
self.assertNotIn('root_uuid_or_disk_id',
|
||||
task.node.driver_internal_info)
|
||||
_cleanup_vmedia_boot_mock.assert_called_once_with(task)
|
||||
|
||||
@mock.patch.object(manager_utils, 'node_set_boot_device', spec_set=True,
|
||||
|
Loading…
x
Reference in New Issue
Block a user