Remove unnecessary steps for cold snapshots

Bug #1242819 reported by Vladan Popovic
6
This bug affects 1 person
Affects Status Importance Assigned to Milestone
OpenStack Compute (nova)
Fix Released
Undecided
Vladan Popovic
Havana
Fix Released
Undecided
Unassigned

Bug Description

When creating cold snapshots we first stop the instance, create a snapshot of that instance, extract the snapshot to a file, delete the snapshot and bring the instance back up.
If the instance is stopped, then there's no need to create a snapshot because there's no concurrent writer, so the snapshot can be extracted directly and save us from the two unnecessary steps (creation and deletion of a snapshot).

Revision history for this message
Guangya Liu (Jay Lau) (jay-lau-513) wrote :

Hi Vladan, how did you take snapshot for the VM, using rest API with curl? I noticed that there is no command line for this, so just filed a bug to trace this. https://bugs.launchpad.net/nova/+bug/1242959

Revision history for this message
Guangya Liu (Jay Lau) (jay-lau-513) wrote :

Clear now, I think that you are using "nova image-create" for cold snapshot.

Revision history for this message
Vladan Popovic (vpopovic) wrote :

Jay, yes the cold snapshots are created with nova image-create.
(I probably should have added that in the description as well)

Revision history for this message
Vladan Popovic (vpopovic) wrote :

Here's the patch, didn't automagically appear here for some reason.
https://review.openstack.org/#/c/52363/

Changed in nova:
assignee: nobody → Vladan Popovic (vpopovic)
status: New → In Progress
Revision history for this message
OpenStack Infra (hudson-openstack) wrote : Fix merged to nova (master)

Reviewed: https://review.openstack.org/52363
Committed: http://github.com/openstack/nova/commit/8c985874c7885f31871204d3f83ce547fefc5fb6
Submitter: Jenkins
Branch: master

commit 8c985874c7885f31871204d3f83ce547fefc5fb6
Author: Vladan Popovic <email address hidden>
Date: Thu Oct 17 07:41:20 2013 -0400

    Remove unnecessary steps for cold snapshots

    Up until now when we created cold snapshots we were stopping the
    instance, create an internal snapshot, extract the snapshot to a file
    and then delete the internal snapshot before bringing up the instance.

    If the instance is shut down, there's no concurrent writer, so the image
    can be directly extracted without taking an internal snapshot first,
    because the snapshot and the current state are the same.

    In this patch the creation and deletion of the internal snapshot are
    removed to eliminate the extra steps and optimize the creation of
    snapshots a bit.

    Closes-Bug: #1242819
    Closes-Bug: #1247185

    Change-Id: I429fa2e1e26aea321eecbf14edd11263fff525ae

Changed in nova:
status: In Progress → Fix Committed
Changed in nova:
milestone: none → icehouse-1
Thierry Carrez (ttx)
Changed in nova:
status: Fix Committed → Fix Released
Revision history for this message
OpenStack Infra (hudson-openstack) wrote : Fix proposed to nova (stable/havana)

Fix proposed to branch: stable/havana
Review: https://review.openstack.org/78529

Thierry Carrez (ttx)
Changed in nova:
milestone: icehouse-1 → 2014.1
Revision history for this message
OpenStack Infra (hudson-openstack) wrote : Fix merged to nova (stable/havana)

Reviewed: https://review.openstack.org/78529
Committed: https://git.openstack.org/cgit/openstack/nova/commit/?id=d1356f7d2ab1fb3a91e7602153f0c8ce1073f1e5
Submitter: Jenkins
Branch: stable/havana

commit d1356f7d2ab1fb3a91e7602153f0c8ce1073f1e5
Author: QingXin Meng <email address hidden>
Date: Tue Mar 4 05:20:40 2014 -0800

    Remove unnecessary steps for cold snapshots

    Up until now when we created cold snapshots we were stopping the
    instance, create an internal snapshot, extract the snapshot to a file
    and then delete the internal snapshot before bringing up the instance.

    If the instance is shut down, there's no concurrent writer, so the image
    can be directly extracted without taking an internal snapshot first,
    because the snapshot and the current state are the same.

    In this patch the creation and deletion of the internal snapshot are
    removed to eliminate the extra steps and optimize the creation of
    snapshots a bit.

    Closes-Bug: #1242819
    Closes-Bug: #1247185

    Change-Id: I429fa2e1e26aea321eecbf14edd11263fff525ae
    (cherry picked from commit 8c985874c7885f31871204d3f83ce547fefc5fb6)

tags: added: in-stable-havana
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.