Introduce Driver Capabilities¶
This spec introduces inspectable (via Ironic API) capabilities for Ironic drivers.
Capabilities are required for at least these use cases:
Scheduling on a node with a proper driver.
E.g. with time we start implementing variants of deployment that are not supported by all drivers, including:
Whole-disk vs partition deployment .
Using configdrive for deployment .
Using ephemeral partitions.
We need to take all these differences into account when scheduling. Failure to do so will lead to errors on the late stage of deployment or even (as with whole-disk) to the wrong deployment.
Ironic should be able to aggregate driver capabilities into node capabilities to expose them to the scheduler. (Not addressed by this spec.)
Examining driver features.
As we are introducing more vendor-specific things, we need some way to find out, if one is supported by a given driver. Driver capabilities would enable 3rd-party tools to inspect support of particular feature by particular driver.
Introduce get_capabilities() call to all driver interfaces, return value being set of strings.
Introduce get_capabilities() call to
BaseDriver, defaulting to union of capabilities of all interfaces.
Publish capabilities as
With the above changes, a developer could use the Ironic API to go through the list of drivers and inspect their capabilities.
Obviously the best solution would be to have all drivers implement the same set of capabilities. Unfortunately, it’s not realistic. E.g. some drivers (like IPMI) are more generic than the other (like ILO and DRAC), but we don’t want to artificialy limit what more specific drivers can expose.
Data model impact¶
None. For now we expect driver capabilities to be a hardcoded constant.
REST API impact¶
Get driver capabilities.
Method type GET.
Normal http response code(s): 200
Expected error http response code(s)
404 - driver not found.
name- driver name
Response: JSON list of strings.
A corresponding change in the client library and CLI is necessary, e.g.
$ ironic driver-get-capabilities pxe_ipmitool
RPC API impact¶
New synchronous RPC method
driver_name, returning list of capabilities.
Driver API impact¶
get_capabilitiesadded to all interfaces, defaulting to returning an empty set.
get_capabilitiesadded to the
BaseDriver, defaulting to returning a union of
get_capabilitiesresults for all interfaces.
Change is backward-compatible.
Nova driver impact¶
None for now. This spec is a starting point to implement hardware capabilities for nodes , which will affect Nova driver.
Other end user impact¶
New CLI command:
ironic driver-get-capabilities <driver name>
Other deployer impact¶
Driver developers can override
get_capabilitiesto provide information about additional capabilities.
- Primary assignee:
get_capabilitiesto all interfaces.
get_driver_capabilitiesto the RPC API.
Add new REST API.
Research whether to add capabilities to existing drivers.
Upgrades and Backwards Compatibility¶
No upgrade impact
New API should be documented.
Driver documentation should mention the new method.