Prepare [inspector]require_managed_boot to change to True in the future
Currently, we silently fall back to ironic-inspector managing boot if the boot interface cannot do it. What ironic-inspector does is set the boot device to PXE and issue a reboot request. This was done to keep backward compatibility with how inspection worked before managed boot was introduced. With in-band inspection migrating to Ironic proper, this "unmanaged" mode becomes a more exotic case since it requires additional PXE infrastructure. Additionally, the popularity of Redfish is rapidly growing, and we support pre-populating ports when Redfish is used. As such, the "unmanaged" mode should no longer be allowed by default. This change prepares for the future flip of the default value by issuing a deprecation warning if no explicit value is set for the option. Depends-On: https://review.opendev.org/c/openstack/bifrost/+/877469 Change-Id: I6a13cf62b427c9e5c7d7d9ddc447d60f94592c9a
This commit is contained in:
parent
e30ba65f94
commit
58388212bc
@ -34,11 +34,14 @@ opts = [
|
||||
help=_('endpoint to use as a callback for posting back '
|
||||
'introspection data when boot is managed by ironic. '
|
||||
'Standard keystoneauth options are used by default.')),
|
||||
cfg.BoolOpt('require_managed_boot', default=False,
|
||||
cfg.BoolOpt('require_managed_boot', default=None,
|
||||
help=_('require that the in-band inspection boot is fully '
|
||||
'managed by ironic. Set this to True if your '
|
||||
'installation of ironic-inspector does not have a '
|
||||
'separate PXE boot environment.')),
|
||||
'managed by the node\'s boot interface. Set this to '
|
||||
'True if your installation does not have a separate '
|
||||
'(i)PXE boot environment for node discovery. Set '
|
||||
'to False if you need to inspect nodes that are not '
|
||||
'supported by boot interfaces (e.g. because they '
|
||||
'don\'t have ports).')),
|
||||
]
|
||||
|
||||
|
||||
|
@ -164,6 +164,14 @@ def _start_managed_inspection(task):
|
||||
class Inspector(base.InspectInterface):
|
||||
"""In-band inspection via ironic-inspector project."""
|
||||
|
||||
def __init__(self):
|
||||
super().__init__()
|
||||
if CONF.inspector.require_managed_boot is None:
|
||||
LOG.warning("The option [inspector]require_managed_boot will "
|
||||
"change its default value to True in the future. "
|
||||
"Set it to an explicit boolean value to avoid a "
|
||||
"potential breakage.")
|
||||
|
||||
def get_properties(self):
|
||||
"""Return the properties of the interface.
|
||||
|
||||
|
@ -0,0 +1,8 @@
|
||||
---
|
||||
deprecations:
|
||||
- |
|
||||
The default value of the ``[inspector]require_managed_boot`` option will
|
||||
change from ``False`` to ``True`` in the future, causing in-band inspection
|
||||
to fail if the boot interface cannot prepare the ramdisk boot (e.g. in case
|
||||
of missing ports). Please set this option to an explicit value to avoid
|
||||
the behavior change.
|
Loading…
x
Reference in New Issue
Block a user