Implement shrinking disk for libvirt

Registered by Sahid Orentino

The current implementation of libvirt for openstack does not resize the disk down during a scale down of an instance that requires a disk resize, it just skips this step silently. (https://review.openstack.org/#/c/67430/)

    We need to add this feature to the driver libvirt.

There is a discuss on: https://bugs.launchpad.net/nova/+bug/1270238

"""About the risk of the implementation, in the workflow of a resize, every modifications on the disk are doing in a copy. The user is asked to check if all run well: during this step the user can check the console-log and connect itself on the instance to check if all is OK.
    if all is ok he just have to confirm the resize (resize-confirm).
    if something wrong he can do a revert (resize-revert)

The implementation of xenapi seems to support this feature. For vmware, it is not implemented yet (only extend)."""

Blueprint information

Status:
Complete
Approver:
Russell Bryant
Priority:
Undefined
Drafter:
Sahid Orentino
Direction:
Needs approval
Assignee:
Sahid Orentino
Definition:
Obsolete
Series goal:
None
Implementation:
Started
Milestone target:
None
Started by
Sahid Orentino
Completed by
Sahid Orentino

Related branches

Sprints

Whiteboard

Gerrit topic: https://review.openstack.org/#q,topic:bp/libvirt-resize-disk-down,n,z

There wasn't consensus on the bug that this is something we should add. Can you create a thread on openstack-dev about this? Once you do, please add a link to the thread to the blueprint whiteboard so we can track it from here. --russellb

The thread on openstack-dev:
    http://lists.openstack.org/pipermail/openstack-dev/2014-January/025960.html

deferred from icehouse-3 to "next": http://lists.openstack.org/pipermail/openstack-dev/2014-February/026335.html

Addressed by: https://review.openstack.org/78996
    Add extra parameter size to resize2fs

Addressed by: https://review.openstack.org/78997
    Add safe_resize2fs to be public

Addressed by: https://review.openstack.org/78998
    Add method to shrink disk image

Addressed by: https://review.openstack.org/79321
    Implement disk shrink to libvirt driver

Removed from next, as next is now reserved for near misses from the last milestone --johnthetubaguyGerrit topic: https://review.openstack.org/#q,topic:bp/libvirt-resize-disk-down,n,z

There wasn't consensus on the bug that this is something we should add. Can you create a thread on openstack-dev about this? Once you do, please add a link to the thread to the blueprint whiteboard so we can track it from here. --russellb

The thread on openstack-dev:
    http://lists.openstack.org/pipermail/openstack-dev/2014-January/025960.html

deferred from icehouse-3 to "next": http://lists.openstack.org/pipermail/openstack-dev/2014-February/026335.html

Addressed by: https://review.openstack.org/78996
    Add extra parameter size to resize2fs

Addressed by: https://review.openstack.org/78997
    Add safe_resize2fs to be public

Addressed by: https://review.openstack.org/78998
    Add method to shrink disk image

Addressed by: https://review.openstack.org/79321
    Implement disk shrink to libvirt driver

Removed from next, as next is now reserved for near misses from the last milestone --johnthetubaguy

Marking this blueprint as definition: Drafting. If you are still working on this, please re-submit via nova-specs. If not, please mark as obsolete, and add a quick comment to describe why. --johnthetubaguy (20th April 2014)Gerrit topic: https://review.openstack.org/#q,topic:bp/libvirt-resize-disk-down,n,z

There wasn't consensus on the bug that this is something we should add. Can you create a thread on openstack-dev about this? Once you do, please add a link to the thread to the blueprint whiteboard so we can track it from here. --russellb

The thread on openstack-dev:
    http://lists.openstack.org/pipermail/openstack-dev/2014-January/025960.html

deferred from icehouse-3 to "next": http://lists.openstack.org/pipermail/openstack-dev/2014-February/026335.html

Addressed by: https://review.openstack.org/78996
    Add extra parameter size to resize2fs

Addressed by: https://review.openstack.org/78997
    Add safe_resize2fs to be public

Addressed by: https://review.openstack.org/78998
    Add method to shrink disk image

Addressed by: https://review.openstack.org/79321
    Implement disk shrink to libvirt driver

Removed from next, as next is now reserved for near misses from the last milestone --johnthetubaguyGerrit topic: https://review.openstack.org/#q,topic:bp/libvirt-resize-disk-down,n,z

There wasn't consensus on the bug that this is something we should add. Can you create a thread on openstack-dev about this? Once you do, please add a link to the thread to the blueprint whiteboard so we can track it from here. --russellb

The thread on openstack-dev:
    http://lists.openstack.org/pipermail/openstack-dev/2014-January/025960.html

deferred from icehouse-3 to "next": http://lists.openstack.org/pipermail/openstack-dev/2014-February/026335.html

Addressed by: https://review.openstack.org/78996
    Add extra parameter size to resize2fs

Addressed by: https://review.openstack.org/78997
    Add safe_resize2fs to be public

Addressed by: https://review.openstack.org/78998
    Add method to shrink disk image

Addressed by: https://review.openstack.org/79321
    Implement disk shrink to libvirt driver

Removed from next, as next is now reserved for near misses from the last milestone --johnthetubaguy

Marking this blueprint as definition: Drafting. If you are still working on this, please re-submit via nova-specs. If not, please mark as obsolete, and add a quick comment to describe why. --johnthetubaguy (20th April 2014)

Marking this blueprint as definition: Drafting. If you are still working on this, please re-submit via nova-specs. If not, please mark as obsolete, and add a quick comment to describe why. --johnthetubaguy (20th April 2014)

(?)

Work Items

This blueprint contains Public information 
Everyone can see this information.