Libvirt: clean driver from libvirt calls

Registered by Sahid Orentino

General idea behind this blueprint is to provide a layer between
driver.py and libvirt to split specifications and implementations.

This blueprint continue work already done in previous releases by
encapsulate host related libvirt calls in a Host's object and domain
related libvirt calls in a Guest's object.

Most of the code in libvirt.driver are already tested so we can expect
no regression and problably a better coverage since every new methods
introduced in Host and Guest will come with new tests.

Since several portions of code will be moved this will probably imply
more conflicts during a backport so I will be able to review/help any
of them.

Finally we can expect to reduce complexity of driver and help
maintainability

Blueprint information

Status:
Complete
Approver:
Matt Riedemann
Priority:
Low
Drafter:
Sahid Orentino
Direction:
Approved
Assignee:
Sahid Orentino
Definition:
Approved
Series goal:
Accepted for newton
Implementation:
Implemented
Milestone target:
milestone icon newton-2
Started by
Sahid Orentino
Completed by
Matt Riedemann

Related branches

Sprints

Whiteboard

Gerrit topic: https://review.openstack.org/#q,topic:bp/libvirt-clean-driver,n,z

Addressed by: https://review.openstack.org/249140
    libvirt: introduce freeze filesystems

Addressed by: https://review.openstack.org/249141
    libvirt: introduce thaw filesystems

Addressed by: https://review.openstack.org/249138
    libvirt: replace direct libvirt's call AbortJobBlock

Addressed by: https://review.openstack.org/249139
    libvirt: move find_disk to Guest's object

Addressed by: https://review.openstack.org/249353
    libvirt: introduce "snapshot" to Guest's object

Addressed by: https://review.openstack.org/251288
    libvirt: introduce block_stats to return device stats

Addressed by: https://review.openstack.org/249834
    libvirt: introduce "pause" to Guest's object

Addressed by: https://review.openstack.org/249835
    libvirt: wrapper list_instance_guests to Host's object

Addressed by: https://review.openstack.org/249833
    libvirt: introduce "shutdown" to Guest's object

Addressed by: https://review.openstack.org/250740
    libvirt: introduce get_job_info to Guest's object

Addressed by: https://review.openstack.org/250739
    libvirt: configure migrate max downtime

Addressed by: https://review.openstack.org/250738
    libvirt: introduce "abort_job" to Guest's object

Addressed by: https://review.openstack.org/250365
    libvirt: introduce "migrate" to Guest's object

Discussed in IRC as a specless blueprint to track the cleanup work going on in the libvirt driver. -- mriedem 20151203

Addressed by: https://review.openstack.org/254709
    libvirt: check graphic/serial consoles at pre_live_migration step

Gerrit topic: https://review.openstack.org/#q,topic:clean-exception,n,z

Sorry, we have now hit the Non-Priority Feature Freeze for Mitaka. For more details please see: http://docs.openstack.org/releases/schedules/mitaka.html#m-nova-npff and http://docs.openstack.org/developer/nova/process.html#non-priority-feature-freeze
--johnthetubaguy 2016.02.10

Addressed by: https://review.openstack.org/295933
    libvirt: live_migration_flags/block_migration_flags default to 0

Re-approved for newton given there were some outstanding changes still being made. In the future, we should probably target a blueprint per release and close it out when done, i.e. we should have closed this for mitaka and opened a new libvirt-clean-driver-newton blueprint for newton work. -- mriedem 20160324

Addressed by: https://review.openstack.org/299489
    libvirt: remove live migrate workaround for an unsupported ver

Addressed by: https://review.openstack.org/299490
    libvirt: introduces object to handle domain xml migration

Addressed by: https://review.openstack.org/327761
    libvirt: split out code for detecting live migration job type

Addressed by: https://review.openstack.org/327762
    libvirt: split out code for determining if migration should abort

Addressed by: https://review.openstack.org/327763
    libvirt: split off code for updating live migration downtime

Addressed by: https://review.openstack.org/327764
    libvirt: split off code for updating migration stats in the DB

Addressed by: https://review.openstack.org/327765
    libvirt: split out code for processing migration tasks

Addressed by: https://review.openstack.org/327766
    libvirt: split out code for recovering after migration tasks

Gerrit topic: https://review.openstack.org/#q,topic:bp/auto-live-migration-completion,n,z

All of the current patches for this blueprint are merged, so I'm marking this as complete for Newton. We can create a libvirt-clean-driver-ocata blueprint for work in the Ocata release if we plan on more cleanups. -- mriedem 20160628

Addressed by: https://review.openstack.org/368732
    Revert "libvirt: move graphic/serial consoles check to pre_live_migration"

(?)

Work Items

This blueprint contains Public information 
Everyone can see this information.

Subscribers

No subscribers.