libvirt: Use Libvirt Storage Pools

Registered by Solly Ross on 2014-04-11

Currently, the libvirt driver does not make use of libvirt's storage pools
and volumes. Using libvirt storage pools would simplify adding support for
new image backends, as well as facilitating cold migrations (see https://blueprints.launchpad.net/nova/+spec/migrate-libvirt-volumes).

Blueprint information

Status:
Not started
Approver:
John Garbutt
Priority:
Medium
Drafter:
Solly Ross
Direction:
Needs approval
Assignee:
Paul Carlton
Definition:
Pending Approval
Series goal:
Proposed for newton
Implementation:
Unknown
Milestone target:
None

Related branches

Sprints

Whiteboard

Gerrit topic: https://review.openstack.org/#q,topic:bp/use-libvirt-storage-pools,n,z

Addressed by: https://review.openstack.org/310505 <== spec for newton
    Blueprint to use libvirt storage pools

Addressed by: https://review.openstack.org/232045 <== spec for mitaka
    Blueprint to use libvirt storage pools

Addressed by: https://review.openstack.org/86947
    Blueprint to use libvirt storage pools

Seems unlikely for Juno now --johnthetubaguy 29th July 2014

It's actually almost finished (I just have to make absolutely sure there's no weird bugs when doing migration) -- sross, 29th July 2014

Gerrit topic: https://review.openstack.org/#q,topic:bp/use-libvirt-storage-pools,n,z

Addressed by: https://review.openstack.org/111082
    count image files on NFS as shared block storage

Addressed by: https://review.openstack.org/111459
    Implement Libvirt Storage Pools Image Backend

Addressed by: https://review.openstack.org/113058
    Make Nova Baremetal Use Its Own ImageCacheManager

Addressed by: https://review.openstack.org/113059
    Make Libvirt ImageCacheManager use a Storage Pool

Addressed by: https://review.openstack.org/113060
    Introduce the Libvirt Storage Image Backend

Addressed by: https://review.openstack.org/113061
    Enable Transitioning To Libvirt Storage

Addressed by: https://review.openstack.org/116136
    Support RBD in the Libvirt Storage Pool Backend

Sorry, this does not have enough positive reviews to make it for juno-3, please resubmit for kilo. For more information, please contact me (johnthetubaguy) via IRC or email. --johnthetubaguy 2nd September 2014

Addressed by: https://review.openstack.org/126978
    Blueprint to use libvirt storage pools

Addressed by: https://review.openstack.org/148769
    Support Resizing and Checking Filesystems with VFS

Addressed by: https://review.openstack.org/148770
    Libvirt: transition to pool backend on migrate

Addressed by: https://review.openstack.org/148771
    Libvirt: transition to pool backend on reboot

Addressed by: https://review.openstack.org/148772
    Libvirt: transition to pool backend on blk migrate

Addressed by: https://review.openstack.org/152348
    VFS: Fix test patching oslo.utils.import_module

Addressed by: https://review.openstack.org/152349
    Libvirt: Add support for storage XML to config

Addressed by: https://review.openstack.org/152350
    Libvirt: Introduce Storage Pool Utilities

There is a lot of code here, but this seems like one we want to get into kilo, so leaving here for now. --johnthetubaguy 3 Feb 2015

Please note we need to re-propose the spec for Mitaka to get this approved --johnthethetubaguy 20151110

deferred to newton --johnthetubaguy 2nd March 2016

Pending Patches
=============

Gerrit topic: https://review.openstack.org/#q,topic:bp/proposes,n,z

Addressed by: https://review.openstack.org/310505
    use libvirt storage pools

Addressed by: https://review.openstack.org/279625
    Add a lock() context manager to image backend

Addressed by: https://review.openstack.org/279626
    Rename Raw backend to NoBacking

Addressed by: https://review.openstack.org/278011
    Implement import_file for LVM backend

Addressed by: https://review.openstack.org/267662
    Make import_file do its own cleanup

Addressed by: https://review.openstack.org/279669
    Introduce ImageCacheLocalPool

Addressed by: https://review.openstack.org/267661
    Remove fake_imagebackend.Raw and cleanup dependent tests

Addressed by: https://review.openstack.org/270998
    Rename Image.check_image_exists to Image.exists()

Addressed by: https://review.openstack.org/265886
    Remove deprecated option libvirt.remove_unused_kernels

Addressed by: https://review.openstack.org/250872
    Only attempt to inject files if the injection disk exists

Addressed by: https://review.openstack.org/278012
    Implement import_file for ploop backend

Addressed by: https://review.openstack.org/311092
    WIP: Create storage pools and volumes

Addressed by: https://review.openstack.org/282580
    Update libvirt to use create_from_func and check_backing_from_func

Addressed by: https://review.openstack.org/282434
    Add Image.create_from_func

Addressed by: https://review.openstack.org/282433
    Add check_backing_from_func interface

Gerrit topic: https://review.openstack.org/#q,topic:libvirt-instance-storage,n,z

Addressed by: https://review.openstack.org/314134
    Implementation of Libvirt Storage Pools

Addressed by: https://review.openstack.org/333836
    Libvirt Storage Pools unit tests fixes

(?)

Work Items

Dependency tree

* Blueprints in grey have been implemented.