Migrating from ironic-inspector¶
This document outlines the process of migrating from a separate ironic-inspector service to the built-in in-band inspection.
Note
This is a live document that is updated as more ironic-inspector features
are supported in ironic. If you’re upgrading to a branch other than
master
, use the version of this document from the target branch.
Understand the feature differences¶
Removed¶
Some rarely used or controversial features have not been migrated to ironic. This list currently includes:
Node auto-discovery is no longer based on plug-ins.
Introspection of nodes in the
active
provision state.PXE filters based on
iptables
.Certain client commands are not available in ironicclient, for example, the ones that display the network interface information from the LLDP data.
Inspection rules are also currently not implemented but are planned for the 2024.2 release or later.
New defaults¶
The database
data storage backend
is used by default.The list of
default hooks
is limited to only most commonly used ones (see also Built-in hooks).
Built-in hooks¶
Most of the introspection hooks have been migrated to ironic, although many have been migrated for clarity and consistency.
Inspector |
ironic |
|
Notes |
---|---|---|---|
|
|
No |
|
|
|
No |
Split into two logical parts. |
|
|
No |
python-hardware is not actively maintained any more. |
|
|
No |
|
|
|
No |
|
|
|
No |
|
|
|
No |
|
|
|
No |
|
|
|
No |
|
|
|
Yes |
|
|
|
Only |
Split, dropped |
|
|
Yes |
Split into two logical parts. |
Custom hooks¶
A custom hook (called processing hook in ironic-inspector) has to be
derived from the base class InspectionHook
. It differs
from the older ProcessingHook
in a few important ways, requiring custom hooks to be adapted for ironic:
Hooks operate on the regular
task
instead of the inspector-specificNodeInfo
object.Since changes to nodes and ports no longer require an API call, hooks are expected to commit their changes immediately rather than letting them accumulate on the task object.
The hook methods have been renamed:
before_processing
is calledpreprocess
, the__call__
method is used instead ofbefore_update
.Introspection data has been split into its inventory part and plugin data. Hooks should not update the inventory.
New hooks use the entry point
ironic.inspection.hooks
instead ofironic_inspector.hooks.processing
.
Other concerns¶
There is no way to migrate the inspection data automatically. You need to repeat inspections or copy the data over manually.
Migration process¶
Make sure you’re running at ironic 2024.1 or newer.
Enable the new inspection implementation as described in In-Band Inspection.
Carefully research options in the
inventory
andinspector
sections. Update options to match similar ones in the ironic-inspector configuration.Enable the required Built-in hooks, taking into the account the new names and composition.
If using network boot and unmanaged inspection or auto-discovery, configure unmanaged boot.
If using the OpenStack Networking, consider configuring (but not starting yet) the PXE filter service.
Make sure no inspection are running.
Stop ironic-inspector or at least disable its PXE filter (it may conflict with the one used here).
Start PXE filter service if needed. Restart the Bare Metal service.
Change all nodes to use the new inspection interface, for example:
baremetal node list --fields uuid inspect_interface -f value | while read uuid iface; do if [ "$iface" = "inspector" ]; then baremetal node set --inspect-interface agent "$uuid" fi done
Make sure your scripts use ironicclient and the Bare Metal API in OpenStackSDK instead of the client API that is specific to ironic-inspector.