This is the first in a series of commits to add support for codespell. This is continuning the process completed in ironic-python-agent. Future Commits will add a Tox Target, CI support and potentially a git-blame-ignore-revs file if their are lots of spelling mistakes that could clutter git blame. Change-Id: Id328ff64c352e85b58181e9d9e35973a8706ab7a
4.7 KiB
Inspection hooks
Inspection hooks are a type of the Bare Metal service plug-ins responsible for processing data from in-band inspection. By configuring these hooks, an operator can fully customize the inspection processing phase. How the data is collected can be configured with inspection collectors.
Configuring hooks
Two configuration options are responsible for inspection hooks:
:oslo.configinspector.default_hooks defines which hooks run by
default, while :oslo.configinspector.hooks defines which hooks to run in your
deployment. Only the second option should be modified by operators,
while the first one is to provide the defaults without hardcoding
them:
[inspector]
hooks = $default_hooksTo make a hook run after the default ones, append it to the list, e.g.
[inspector]
hooks = $default_hooks,extra-hardwareDefault hooks
In the order they go in the :oslo.configinspector.default_hooks
option:
ramdisk-error-
Processes the
errorfield from the ramdisk, aborting inspection if it is not empty. validate-interfaces-
Validates network interfaces and stores the result in the
plugin_datain two fields:all_interfaces- all interfaces that pass the basic sanity check.valid_interfaces- interfaces that satisfy the configuration in the :oslo.configinspector.add_portsoption.
In both cases, interfaces get an addition field:
pxe_enabled- whether PXE was enabled on this interface during the inspection boot.
ports-
Creates ports for interfaces in
valid_interfacesas set by thevalidate-interfaceshook.Deletes ports that don't match the :oslo.config
inspector.keep_portssetting. architecture-
Populates the
cpu_archproperty on the node.
Optional hooks
accelerators-
Populates the
acceleratorsproperty based on the reported PCI devices. The known accelerators are specified in the YAML file linked in the :oslo.configinspector.known_acceleratorsoption. The default file is the following:../../../../ironic/drivers/modules/inspector/hooks/known_accelerators.yaml
boot-mode-
Sets the
boot_modecapability based on the observed boot mode, seeboot_mode_support. cpu-capabilities-
Uses the CPU flags to
discover CPU capabilities <capabilities-discovery>. The exact mapping can be customized via configuration:[inspector] cpu_capabilities = vmx:cpu_vt,svm:cpu_vtSee :oslo.config
inspector.cpu_capabilitiesfor the default mapping. extra-hardware-
Converts the data collected by python-hardware from its raw format into nested dictionaries under the
extraplugin data field. local-link-connection-
Uses the LLDP information from the ramdisk to populate the
local_link_connectionfield on ports with the physical switch information. memory-
Populates the
memory_mbproperty based on physical RAM information from DMI. parse-lldp-
Parses the raw binary LLDP information from the ramdisk and populates the
parsed_lldpdictionary in plugin data. The keys are network interface names, the values are dictionaries with LLDP values. Example:"parsed_lldp": { "eth0": { "switch_chassis_id": "11:22:33:aa:bb:cc", "switch_system_name": "sw01-dist-1b-b12" } } pci-devices-
Populates the capabilities based on PCI devices. The mapping is provided by the :oslo.config
inspector.pci_device_aliasoption. physical-network-
Populates the
physical_networkport field for/admin/multitenancybased on the detected IP addresses. The mapping is provided by the :oslo.configinspector.physical_network_cidr_mapoption. raid-device-
Detects the newly created RAID device and populates the
root_deviceproperty used inroot device hints <root-device-hints>. Requires two inspections: one before and one after the RAID creation. root-device-
Uses
root device hints <root-device-hints>on the node and the storage device information from the ramdisk to calculate the expected root device and populate thelocal_gbproperty (taking the :oslo.configinspector.disk_partitioning_spacingoption into account).