PXE driver should mount target iSCSI volume and "dd" image

Registered by aeva black

In nova-baremetal, there are two separate processes to handle the PXE deployment, nova-compute and nova-baremetal-deploy-helper. Let's merge those into Ironic's PXE driver.

The old flow went like this:
- pxe driver prepares tftp bootloader
- ipmi driver powers on machine
- pxe driver goes into a polling loop, watching the state in the DB, waiting for deploy to finish...
- baremetal-deploy-helper gets iSCSI info from node, sets node state to "DEPLOYING"
- baremetal-deploy-helper connects to iSCSI end point, partitions volume, dd's the image onto it, updates tftp config
- baremetal-deploy-helper asks the machine to restart
- baremetal-deploy-helper changes node state in DB to "DEPLOYDONE"
- pxe driver notices the state change, does final tasks, and finishes.

The new flow should probably go like this:
- pxe driver prepares tftp bootloader
- ipmi driver powers on machine
- machine DHCP boots the deploy ramdisk
- ramdisk POSTs iSCSI connection info to ironic-api, using vendor_passthrough extension
- pxe driver connects to iSCSI end point, partitions volume, dd's the image onto it, closes the iSCSI connection, and updates tftp bootloader
- ipmi driver restarts the machine
- machine DHCP boots the user's ramdisk

To facilitate this, we will need additional API capabilities exposed by the PXE driver, via the vendor_passthrough extension point in the API. This should be used by the deploy ramdisk to pass the iSCSI endpoint address and credentials securely back to Ironic.

Some caution should be used around the locking and state transitions during the provisioning process; a TaskManager lock will not be held while waiting for the deploy ramdisk to POST back the iSCSI credentials, so an intermediate state should be tracked in the DB. A periodic task should be used, with a configurable timeout, to log and clean up from failed deploys.

Blueprint information

aeva black
Ghe Rivero
Series goal:
Accepted for icehouse
Milestone target:
milestone icon 2014.1
Started by
aeva black
Completed by
aeva black

Related branches



a question about this bp.

nova-baremetal sends a simple ping to the deploy-helpper on port 10,000 to start the deploy process. Will Ironic listen on port 10,000 for this ping, or will we create a Ironic-deploy ram-disk that can talk directly to the ironic api?

along these lines, the nova-baremetal process currently sends a simple ping back to the node to indicate the deployment is done. Will this still be the case or will the Ironic deploy have another way of detecting the deploy is done. ie. polling the api? Do we care that the node knows the deployment is done? are there services that need to be shutdown on the node before it is rebooted or can it just be power cycled? -- Chris


I do not think the deploy ramdisk should talk to Ironic's public API (networking and security issues come to mind). To support hardware enrollment, I think we will need something only slightly more structured than the current implementation. For reference, here is the current code:

As far as "what happens when dd is complete"? I believe we should allow the baremetal node to gracefully stop services (eg, iSCSI) as it does today, but whereas the current ramdisk shuts down after "stop_iscsi_target", we should probably post a "Completed" notice to Ironic, and allow Ironic to power cycle the node at that point. This will prevent a bug that we found recently in Baremetal.

-- Devananda

Gerrit topic: https://review.openstack.org/#q,topic:bp/pxe-mount-and-dd,n,z

Addressed by: https://review.openstack.org/41976
    Add pass_vendor_info method to conductor

Addressed by: https://review.openstack.org/45394
    Mount iSCSI target and 'dd' in PXE driver (WORKINPROGRESS)

Addressed by: https://review.openstack.org/49537
    Add vendor_passthru rpc call to node controller

Addressed by: https://review.openstack.org/50409
    Add power cycles control to PXE driver


Work Items

Dependency tree

* Blueprints in grey have been implemented.

This blueprint contains Public information 
Everyone can see this information.