Drop fallback to unmanaged inspection for virtual media and UEFI boot
It is not expected that nodes configured this way start PXE-booting. Change-Id: I9bc5ab73bb54e0612fb6025f10c4d41a5b8842cb
This commit is contained in:
parent
2f71e5d512
commit
2f399a1fb7
@ -342,12 +342,7 @@ class IloVirtualMediaBoot(base.BootInterface):
|
||||
parameters
|
||||
:raises: UnsupportedDriverExtension
|
||||
"""
|
||||
try:
|
||||
_validate_driver_info(task)
|
||||
except exception.MissingParameterValue:
|
||||
# Fall back to non-managed in-band inspection
|
||||
raise exception.UnsupportedDriverExtension(
|
||||
driver=task.node.driver, extension='inspection')
|
||||
_validate_driver_info(task)
|
||||
|
||||
@METRICS.timer('IloVirtualMediaBoot.prepare_ramdisk')
|
||||
def prepare_ramdisk(self, task, ramdisk_params):
|
||||
@ -921,12 +916,7 @@ class IloUefiHttpsBoot(base.BootInterface):
|
||||
parameters
|
||||
:raises: UnsupportedDriverExtension
|
||||
"""
|
||||
try:
|
||||
self._validate_driver_info(task)
|
||||
except exception.MissingParameterValue:
|
||||
# Fall back to non-managed in-band inspection
|
||||
raise exception.UnsupportedDriverExtension(
|
||||
driver=task.node.driver, extension='inspection')
|
||||
self._validate_driver_info(task)
|
||||
|
||||
@METRICS.timer('IloUefiHttpsBoot.prepare_ramdisk')
|
||||
def prepare_ramdisk(self, task, ramdisk_params):
|
||||
|
@ -606,14 +606,9 @@ class RedfishVirtualMediaBoot(base.BootInterface):
|
||||
:param task: A TaskManager instance with the node being checked
|
||||
:raises: MissingParameterValue if node is missing one or more required
|
||||
parameters
|
||||
:raises: UnsupportedDriverExtension
|
||||
"""
|
||||
try:
|
||||
self._validate_driver_info(task)
|
||||
except exception.MissingParameterValue:
|
||||
# Fall back to non-managed in-band inspection
|
||||
raise exception.UnsupportedDriverExtension(
|
||||
driver=task.node.driver, extension='inspection')
|
||||
# No unmanaged fallback for virtual media
|
||||
self._validate_driver_info(task)
|
||||
|
||||
def prepare_ramdisk(self, task, ramdisk_params):
|
||||
"""Prepares the boot of deploy or rescue ramdisk over virtual media.
|
||||
@ -979,14 +974,8 @@ class RedfishHttpsBoot(base.BootInterface):
|
||||
:param task: A TaskManager instance with the node being checked
|
||||
:raises: MissingParameterValue if node is missing one or more required
|
||||
parameters
|
||||
:raises: UnsupportedDriverExtension
|
||||
"""
|
||||
try:
|
||||
self._validate_driver_info(task)
|
||||
except exception.MissingParameterValue:
|
||||
# Fall back to non-managed in-band inspection
|
||||
raise exception.UnsupportedDriverExtension(
|
||||
driver=task.node.driver, extension='inspection')
|
||||
self._validate_driver_info(task)
|
||||
|
||||
def prepare_ramdisk(self, task, ramdisk_params):
|
||||
"""Prepares the boot of the agent ramdisk.
|
||||
|
@ -577,7 +577,7 @@ class IloVirtualMediaBootTestCase(test_common.BaseIloTest):
|
||||
def test_validate_inspection_missing(self, mock_parse_driver_info):
|
||||
with task_manager.acquire(self.context, self.node.uuid,
|
||||
shared=True) as task:
|
||||
self.assertRaises(exception.UnsupportedDriverExtension,
|
||||
self.assertRaises(exception.MissingParameterValue,
|
||||
task.driver.boot.validate_inspection, task)
|
||||
|
||||
@mock.patch.object(image_utils, 'prepare_deploy_iso', autospec=True)
|
||||
@ -1838,7 +1838,7 @@ class IloUefiHttpsBootTestCase(db_base.DbTestCase):
|
||||
"Error validating iLO UEFIHTTPS for deploy.")
|
||||
with task_manager.acquire(self.context, self.node.uuid,
|
||||
shared=True) as task:
|
||||
self.assertRaises(exception.UnsupportedDriverExtension,
|
||||
self.assertRaises(exception.MissingParameterValue,
|
||||
task.driver.boot.validate_inspection, task)
|
||||
|
||||
@mock.patch.object(ilo_common, 'add_certificates',
|
||||
|
@ -507,7 +507,7 @@ class RedfishVirtualMediaBootTestCase(db_base.DbTestCase):
|
||||
def test_validate_inspection_missing(self, mock_parse_driver_info):
|
||||
with task_manager.acquire(self.context, self.node.uuid,
|
||||
shared=True) as task:
|
||||
self.assertRaises(exception.UnsupportedDriverExtension,
|
||||
self.assertRaises(exception.MissingParameterValue,
|
||||
task.driver.boot.validate_inspection, task)
|
||||
|
||||
@mock.patch.object(redfish_boot.RedfishVirtualMediaBoot,
|
||||
|
@ -0,0 +1,9 @@
|
||||
---
|
||||
fixes:
|
||||
- |
|
||||
No longer falls back to `unmanaged` inspection for virtual media and
|
||||
UEFI HTTP boot interfaces. Previously, if the validation of the boot
|
||||
interface failed before in-band inspection, Ironic would switch to
|
||||
unmanaged inspection, which involved PXE-booting. It is not expected
|
||||
that nodes explicitly configured to use virtual media start booting
|
||||
over PXE, so the fallback has been removed.
|
Loading…
Reference in New Issue
Block a user