Nova retains the 'delta' file for the entire snapshot upload time

Bug #1881727 reported by Elancheran S
6
This bug affects 1 person
Affects Status Importance Assigned to Milestone
OpenStack Compute (nova)
Fix Released
Undecided
Elancheran S
Train
Fix Released
Undecided
Unassigned
Ussuri
Fix Released
Undecided
Unassigned

Bug Description

When the live snapshot happens it setups a 100% copy of the original file using libvirt/qemu to sync the disk to it using "Shallow" mode (this is the .delta file). From that .delta file it extracts the image and uploads it. The delta file remains till the upload completes which results in 3x space required for each snapshots.

To fix this issue, the .delta file can be removed once the image is extracted from the .delta file https://github.com/openstack/nova/blob/stable/pike/nova/virt/libvirt/driver.py#L2007-L2008

Revision history for this message
Elancheran S (tsecheran) wrote :

When concurrent snapshots happening in a multiple VM's on a hypervisor leads disk space running out due to the 3x space required.

By providing this fix i.e. deleting the '.delta' file would reduce the space requirement for the concurrent snapshots of multiple VMs in a single hypervisor.

Revision history for this message
OpenStack Infra (hudson-openstack) wrote : Fix proposed to nova (master)

Fix proposed to branch: master
Review: https://review.opendev.org/734421

Changed in nova:
assignee: nobody → Elancheran S (tsecheran)
status: New → In Progress
Changed in nova:
assignee: Elancheran S (tsecheran) → Lee Yarwood (lyarwood)
Changed in nova:
assignee: Lee Yarwood (lyarwood) → Elancheran S (tsecheran)
Revision history for this message
OpenStack Infra (hudson-openstack) wrote : Fix merged to nova (master)

Reviewed: https://review.opendev.org/734421
Committed: https://git.openstack.org/cgit/openstack/nova/commit/?id=d2af7ca7a5c862f53f18c00ac76fc85336fa79e6
Submitter: Zuul
Branch: master

commit d2af7ca7a5c862f53f18c00ac76fc85336fa79e6
Author: esubramanian <email address hidden>
Date: Mon Jun 8 23:08:30 2020 -0700

    Removes the delta file once image is extracted

    When creating a live snapshot of an instance, nova creates a
    copy of the instance disk using a QEMU shallow rebase. This
    copy - the delta file - is then extracted and uploaded. The
    delta file will eventually be deleted, when the temporary
    working directory nova is using for the live snapshot is
    discarded, however, until this happens, we will use 3x the
    size of the image of host disk space: the original disk,
    the delta file, and the extracted file. This can be problematic
    when concurrent snapshots of multiple instances are requested
    at once.

    The solution is simple: delete the delta file after it has
    been extracted and is no longer necessary.

    Change-Id: I15e9975fa516d81e7d34206e5a4069db5431caa9
    Closes-Bug: #1881727

Changed in nova:
status: In Progress → Fix Released
Revision history for this message
OpenStack Infra (hudson-openstack) wrote : Fix proposed to nova (stable/ussuri)

Fix proposed to branch: stable/ussuri
Review: https://review.opendev.org/748034

Revision history for this message
OpenStack Infra (hudson-openstack) wrote : Fix proposed to nova (stable/train)

Fix proposed to branch: stable/train
Review: https://review.opendev.org/748035

Revision history for this message
OpenStack Infra (hudson-openstack) wrote : Fix merged to nova (stable/ussuri)

Reviewed: https://review.opendev.org/748034
Committed: https://git.openstack.org/cgit/openstack/nova/commit/?id=e51555b3f0324b8b72a2b3280a1c30e104b6d8ea
Submitter: Zuul
Branch: stable/ussuri

commit e51555b3f0324b8b72a2b3280a1c30e104b6d8ea
Author: esubramanian <email address hidden>
Date: Mon Jun 8 23:08:30 2020 -0700

    Removes the delta file once image is extracted

    When creating a live snapshot of an instance, nova creates a
    copy of the instance disk using a QEMU shallow rebase. This
    copy - the delta file - is then extracted and uploaded. The
    delta file will eventually be deleted, when the temporary
    working directory nova is using for the live snapshot is
    discarded, however, until this happens, we will use 3x the
    size of the image of host disk space: the original disk,
    the delta file, and the extracted file. This can be problematic
    when concurrent snapshots of multiple instances are requested
    at once.

    The solution is simple: delete the delta file after it has
    been extracted and is no longer necessary.

    Change-Id: I15e9975fa516d81e7d34206e5a4069db5431caa9
    Closes-Bug: #1881727
    (cherry picked from commit d2af7ca7a5c862f53f18c00ac76fc85336fa79e6)

tags: added: in-stable-ussuri
Revision history for this message
OpenStack Infra (hudson-openstack) wrote : Change abandoned on nova (stable/train)

Change abandoned by Elancheran S (<email address hidden>) on branch: stable/train
Review: https://review.opendev.org/748035
Reason: This has been cherry-picked from master instead of stable/ussuri

Revision history for this message
OpenStack Infra (hudson-openstack) wrote : Fix merged to nova (stable/train)

Reviewed: https://review.opendev.org/748035
Committed: https://git.openstack.org/cgit/openstack/nova/commit/?id=06df7cae31246e233dd5cf9b92c6484b519156de
Submitter: Zuul
Branch: stable/train

commit 06df7cae31246e233dd5cf9b92c6484b519156de
Author: esubramanian <email address hidden>
Date: Mon Jun 8 23:08:30 2020 -0700

    Removes the delta file once image is extracted

    When creating a live snapshot of an instance, nova creates a
    copy of the instance disk using a QEMU shallow rebase. This
    copy - the delta file - is then extracted and uploaded. The
    delta file will eventually be deleted, when the temporary
    working directory nova is using for the live snapshot is
    discarded, however, until this happens, we will use 3x the
    size of the image of host disk space: the original disk,
    the delta file, and the extracted file. This can be problematic
    when concurrent snapshots of multiple instances are requested
    at once.

    The solution is simple: delete the delta file after it has
    been extracted and is no longer necessary.

    Change-Id: I15e9975fa516d81e7d34206e5a4069db5431caa9
    Closes-Bug: #1881727
    (cherry picked from commit d2af7ca7a5c862f53f18c00ac76fc85336fa79e6)
    (cherry picked from commit e51555b3f0324b8b72a2b3280a1c30e104b6d8ea)

tags: added: in-stable-train
To post a comment you must log in.
This report contains Public information  
Everyone can see this information.

Other bug subscribers

Remote bug watches

Bug watches keep track of this bug in other bug trackers.