Merge "Better handle missing inspection_network"

This commit is contained in:
Zuul 2024-09-03 14:58:38 +00:00 committed by Gerrit Code Review
commit b0a650a086
4 changed files with 18 additions and 4 deletions

View File

@ -14,6 +14,15 @@ is the only way to conduct inspection using :ref:`redfish-virtual-media` or
with :doc:`/admin/dhcp-less`. This mode is engaged automatically when the node
has sufficient information to configure boot (e.g. ports in case of iPXE).
For network interfaces based on OpenStack Networking (e.g. ``flat`` and
``neutron``), the UUID or name of the inspection network must be provided via
configuration or ``driver_info``, for example:
.. code-block:: ini
[neutron]
inspection_network = <NETWORK UUID>
There are a few configuration options that tune managed inspection, the most
important is ``extra_kernel_params``, which allows adding kernel parameters for
inspection specifically. This is where you can configure

View File

@ -230,6 +230,9 @@ and may be combined if desired.
--driver-info cleaning_network=$CLEAN_UUID_OR_NAME \
--driver-info provisioning_network=$PROVISION_UUID_OR_NAME
If you use :doc:`managed inspection </admin/inspection/managed>`, you may
also configure ``inspection_network`` the same way.
See :doc:`configure-tenant-networks` for details.
#. You must also inform the Bare Metal service of the network interface cards

View File

@ -1032,10 +1032,11 @@ class NeutronNetworkInterfaceMixin(object):
"""
try:
self.get_inspection_network_uuid(task)
except exception.MissingParameterValue:
except exception.MissingParameterValue as exc:
# Fall back to non-managed in-band inspection
raise exception.UnsupportedDriverExtension(
driver=task.node.driver, extension='inspection')
_("Insufficient information provided for managed "
"inspection: %s") % exc)
def get_servicing_network_uuid(self, task):
servicing_network = (

View File

@ -441,10 +441,11 @@ class PXEBaseMixin(object):
"""
try:
self._validate_common(task)
except exception.MissingParameterValue:
except exception.MissingParameterValue as exc:
# Fall back to non-managed in-band inspection
raise exception.UnsupportedDriverExtension(
driver=task.node.driver, extension='inspection')
_("Insufficient information provided for managed "
"inspection: %s") % exc)
_RETRY_ALLOWED_STATES = {states.DEPLOYWAIT, states.CLEANWAIT,
states.RESCUEWAIT}