ironic.drivers.modules.inspector.hooks.raid_device module¶
- class ironic.drivers.modules.inspector.hooks.raid_device.RaidDeviceHook[source]¶
Bases:
InspectionHook
Hook for learning the root device after RAID creation.
This hook can figure out the root device in 2 runs. In the first run, the node’s inventory is saved as usual, and the hook does not do anything. The second run will check the difference between the recently discovered block devices (as reported by the inspection results) and the previously saved ones (from the previously saved inventory). If there is exactly one new block device, its serial number is saved in node.properties under the ‘root_device’ key.
This way, it helps to figure out the root device hint in cases when Ironic doesn’t have enough information to do so otherwise. One such usecase is DRAC RAID configuration, where the BMC doesn’t provide any useful information about the created RAID disks. Using this hook immediately before and after creating the root RAID device will solve the issue of root device hints.
- __call__(task, inventory, plugin_data)[source]¶
Hook to run to process inspection data (before Ironic node update).
This hook is run after node is found and ports are created, just before the node is updated with the data.
- Parameters:
task – A TaskManager instance.
inventory – Hardware inventory information sent by the ramdisk. Must not be modified by the hook.
plugin_data – Plugin data sent by the ramdisk. May be modified by the hook.
- Returns:
nothing.