Config Drive support in the XenAPI driver

Registered by John Garbutt on 2012-08-15

Look at the libvirt driver support for Config Driver, and mirror that ability in the XenAPI driver.

Blueprint information

Status:
Complete
Approver:
Vish Ishaya
Priority:
Medium
Drafter:
Citrix OpenStack development team
Direction:
Needs approval
Assignee:
Michael Still
Definition:
Approved
Series goal:
Accepted for grizzly
Implementation:
Implemented
Milestone target:
milestone icon 2013.1
Started by
Vish Ishaya on 2012-11-01
Completed by
Russell Bryant on 2013-02-12

Related branches

Sprints

Whiteboard

Some steps:
- nova/virt/configdrive.py has ConfigDriveBuilder but depends on nova.virt.libvirt.utils -> refactor
- make agent optional in XenAPI
- config drive code should be triggered by the appropriate flag: instance.get('config_drive') or FLAGS.force_config_drive
- first phase: only vfat type config drive is supported (iso is complicated)
- Use ConfigDriveBuilder to build the raw file
- Create a new VDI with the size of the raw file
- Attach the VDI to compute
- dd all the contents ( the latter steps are implemented for raw image launch )
- As we only implement the vfat route, add a new public method that skips flag check (
FLAGS.config_drive_format == 'iso9660' and FLAGS.config_drive_format == 'vfat')

Non Happy path:
- Migration
- resize
- try out live migration

Lets use Generate -> ISO -> VDI (more likely to stay secure - more similar)

Gerrit topic: https://review.openstack.org/#q,topic:bp/xenapi-config-drive,n,z

Addressed by: https://review.openstack.org/14681
    Move mkfs from libvirt.utils to utils

Addressed by: https://review.openstack.org/14755
    Refactor: move find_guest_agent to xenapi.agent

Addressed by: https://review.openstack.org/14768
    xenapi: Add null agent

Addressed by: https://review.openstack.org/14777
    Refactor: config drive related functions

Addressed by: https://review.openstack.org/14899
    xenapi: refactor: Agent class

Addressed by: https://review.openstack.org/15212
    xenapi: Make agent optional

Addressed by: https://review.openstack.org/18370
    A first cut at adding configdrive to xenapi.

(?)

Work Items

Work items:
Refactor nova/virt/configdrive.py, so that it does not depend on libvirt: DONE
Make agent optional in XenAPI: INPROGRESS
Add configuration entries for config drive to compute config: TODO
Find the places in libvirt, where configdrive is used: TODO
Config drive behavior during migration, resize: TODO
Config drive behavior during live migration: TODO

This blueprint contains Public information 
Everyone can see this information.