Merge "Prepare [inspector]require_managed_boot to change to True in the future"

This commit is contained in:
Zuul 2023-06-05 14:36:59 +00:00 committed by Gerrit Code Review
commit 8ef69aaa6a
3 changed files with 23 additions and 4 deletions

View File

@ -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).')),
]

View File

@ -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.

View File

@ -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.