PXE driver should mount target iSCSI volume and "dd" image
In nova-baremetal, there are two separate processes to handle the PXE deployment, nova-compute and nova-baremetal-
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-
- baremetal-
- baremetal-
- baremetal-
- 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
- Status:
- Complete
- Approver:
- aeva black
- Priority:
- Essential
- Drafter:
- None
- Direction:
- Approved
- Assignee:
- Ghe Rivero
- Definition:
- Approved
- Series goal:
- Accepted for icehouse
- Implementation:
- Implemented
- Milestone target:
- 2014.1
- Started by
- aeva black
- Completed by
- aeva black
Related branches
Related bugs
Sprints
Whiteboard
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:
https:/
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_
-- Devananda
Gerrit topic: https:/
Addressed by: https:/
Add pass_vendor_info method to conductor
Addressed by: https:/
Mount iSCSI target and 'dd' in PXE driver (WORKINPROGRESS)
Addressed by: https:/
Add vendor_passthru rpc call to node controller
Addressed by: https:/
Add power cycles control to PXE driver
Work Items
Dependency tree
* Blueprints in grey have been implemented.