Disallow concurrent snapshots on the same instance

Bug #727502 reported by Rick Harris
10
This bug affects 1 person
Affects Status Importance Assigned to Milestone
OpenStack Compute (nova)
Fix Released
Medium
Brian Lamar
Diablo
Fix Released
Undecided
Unassigned

Bug Description

We currently allow multiple snapshots attempts to occur concurrently for an instance. This is not good.

Much like we already provide concepts of instance and boot-locks, we should add a 'snapshot-lock' that allows only one snapshot to occur at a time for an instance.

Proposal:

This could be implemented as a new column on instance called 'is_snapshotting'. Having this as a column in the DB means that the OSAPI can quickly return whether this the case and fail the request accordingly.

Thierry Carrez (ttx)
Changed in nova:
importance: Undecided → Medium
status: New → Confirmed
Changed in nova:
assignee: nobody → Jason Kölker (jason-koelker)
Revision history for this message
Édouard Thuleau (ethuleau) wrote :

And it will be interesting to set the status "snapshoting" when listing instances

Thierry Carrez (ttx)
Changed in nova:
status: Confirmed → In Progress
Revision history for this message
Jason Kölker (jason-koelker) wrote :

I currently don't have the time to finish this. Unassigning for now. Will pick back up later if I get time.

Changed in nova:
assignee: Jason Kölker (jason-koelker) → nobody
status: In Progress → Confirmed
Brian Lamar (blamar)
Changed in nova:
assignee: nobody → Brian Lamar (blamar)
Revision history for this message
Openstack Gerrit (openstack-gerrit) wrote : A change has been merged to openstack/nova

Reviewed: https://review.openstack.org/686
Committed: http://github.com/openstack/nova/commit/b5abd8e7415c28630852107da7755045f6522b50
Submitter: Jenkins
Branch: master

 status fixcommitted
 done

commit b5abd8e7415c28630852107da7755045f6522b50
Author: Brian Lamar <email address hidden>
Date: Mon Sep 26 23:41:28 2011 -0400

    Snapshots/backups can no longer happen simultaneously. Tests included.

    Implemented exception.InstanceBusy when attempting to snapshot/backup an
    instance which is already snapshotting or being currently backed up.

    Fixes bug 727502.

    (Patch Set 2) 3 new exceptions: InstanceBusy, InstanceSnapshotting, and InstanceBackingUp
    (Patch Set 3) Oops. New exceptions now inherit from InstanceBusy
    (Patch Set 4) Tests now tear down created instances

    Change-Id: I9614740bba26c04e64b0e27c24fbace12334f4d1

Changed in nova:
status: Confirmed → Fix Committed
Revision history for this message
Openstack Gerrit (openstack-gerrit) wrote : Fix merged to nova (stable/diablo)

Reviewed: https://review.openstack.org/955
Committed: http://github.com/openstack/nova/commit/852b9307ac86b20cbe870aa5bbfaf121226f5440
Submitter: Jenkins
Branch: stable/diablo

 status fixcommitted
 done

commit 852b9307ac86b20cbe870aa5bbfaf121226f5440
Author: Brian Lamar <email address hidden>
Date: Mon Sep 26 23:41:28 2011 -0400

    Snapshots/backups can no longer happen simultaneously. Tests included.

    Implemented exception.InstanceBusy when attempting to snapshot/backup an
    instance which is already snapshotting or being currently backed up.

    Fixes bug 727502.

    (Patch Set 2) 3 new exceptions: InstanceBusy, InstanceSnapshotting, and InstanceBackingUp
    (Patch Set 3) Oops. New exceptions now inherit from InstanceBusy
    (Patch Set 4) Tests now tear down created instances

    (cherry picked from commit b5abd8e7415c28630852107da7755045f6522b50)

    Change-Id: I42a04254bd96d5f7a92b71a5d3e79f0350bbda5b

Thierry Carrez (ttx)
Changed in nova:
milestone: none → essex-1
Thierry Carrez (ttx)
Changed in nova:
status: Fix Committed → Fix Released
Revision history for this message
Martin Pitt (pitti) wrote : Please test proposed package

Hello Rick, or anyone else affected,

Accepted nova into oneiric-proposed, the package will build now and be available in a few hours. Please test and give feedback here. See https://wiki.ubuntu.com/Testing/EnableProposed for documentation how to enable and use -proposed. Thank you in advance!

tags: added: verification-needed
Thierry Carrez (ttx)
Changed in nova:
milestone: essex-1 → 2012.1
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.