This blueprint will introduce a new field to the Nodes resource that will be used to store instance-specific data, which will be used by the driver when provisioning or managing that instance.
The metadata which describes a particular instance being deployed is being passed from the client to the deploy driver via the node.driver_info field. That field is intended to store only the driver-specific metadata needed by that driver for the purpose of managing and provisioning that specific node (such as IPMI credentials). Such metadata should be constant across multiple deployments to the node, and updating the driver_info often corresponds to an operator action (such as rotating passwords).
The instance-specific metadata, which changes during every deploy, should not be stored alongside the driver-specific metadata.
Continue to use the driver_info field?
The instance_info field will be added to the nodes table.
A new instance_info attribute will be added to the Node resource.
When preparing the node to be deployed the Nova driver was adding the instance information to the nodes driver_info field, with this change the fields ‘root_gb’, ‘swap_gb’, ‘ephemeral_gb’, ‘ephemeral_format’, ‘image_source’ will now be added to the instance_info field instead.
The nova driver also needs to be changed to not look at the flavor’s extra spec to get the deploy ramdisk and deploy kernel, such fields will be part of the process of enrolling a node and should be present at the node before triggering it to be deployed (otherwise it will fail in the validation).
As a side effect, this change enables a later improvement in security by allowing the driver_info field to be hidden from the REST API, if policies were added and enforced in the API layer. This would allow the management credentials to be hidden from users.
Instead of setting the deploy ramdisk and deploy kernel as part of the flavor in Nova, this fields if required (depending on the driver) should be set by the operator in the driver_info field of the Nodes when enrolling it.
A migration script will be created to demonstrate how to extract the deploy ramdisk and deploy kernel from the Nova flavor and update the Ironic Node’s driver_info field appropriately.
Unit tests and DevStack needs to be changed to cover the new changes.
The DevStack change will need to be staggered in three changes:
Documentation should be modified to instruct operators not to add the deploy kernel and ramdisk glance image UUIDs to the Nova flavor. Instead, the documentation will indicate that operators must pass this information to Ironic when enrolling nodes.