Pass on the capabilities in the flavor to the ironic¶
Today nova doesn’t pass on the capabilities defined in extra-spec key of the flavor. The ironic needs to be aware of the requested capability in the flavor.
Today nova doesn’t pass on the capabilities defined in extra-spec key of the flavor. Today Nova is able to read the capabilities defined in the ironic node’s properties field and select the node using the ComputeCapabilities Filter. Now, the ironic needs to be aware of the requested capability in the flavor so that it can take specific actions as per the request in the flavor once the node has been scheduled by Nova.
The ironic can use it for following:
Prepare the node in the desired state before deploy.
The same can be used during decommisioning the node for unwinding to its original state.
Example: say a capability as, power_optimized=True as given in flavor-key. The ironic has node.properties updated with capability as power_optimzied=True. The node is selected via ComputeCapabilities Filter. Now, if the node’s instance_info is updated by nova as power_optimzied=True, the ironic driver can prepare the node in desired power state. This is applicable for all the hardware capabilities which requires some action from the driver as per the requested capability in the flavor extra-spec key.
The proposal is to update the instance_info field of the node object with the capabilities defined in the flavor extra-spec.
Ironic can in fact look this information up by calling the Nova API. However, that would require Ironic to have sufficient permissions to see the flavor, and would add a Keystone round trip for Ironic to fetch an authentication token. Nova already passes a lot of meta data through in a boot request, so avoiding the extra round trip seems worthwhile.
Data model impact¶
REST API impact¶
Other end user impact¶
Other deployer impact¶
This change takes immediate effect once the ironic is supported for hardware capabilities which is a work-in-progress for kilo in ironic.
See Work Items below.
- Primary assignee:
Require changes in nova/virt/ironic/patcher.py to update the instance_info field with the flavor capabilities.
Unit tests will be added.
This will be documented under ironic.
Exposing Hardware capabilities: https://review.openstack.org/#/c/131272/
For supporting multiple values with capabilities: https://review.openstack.org/133534