VMware: snapshot of attached volume is overwritten

Bug #1236891 reported by Kartik Bommepally
6
This bug affects 1 person
Affects Status Importance Assigned to Milestone
Cinder
Fix Released
Medium
Kartik Bommepally

Bug Description

When we snapshot an attached volume and later create a volume from that snapshot point, we find additional writes happening.

1. Attach volume1 to an instance.
1. Created file1.
2. Created snapshot.
3. Created file2.
4. Detach volume1 from instance.
5. Clone volume2 from snapshot.
6. Attached volume2 to instance.

Now volume2 must have only file1, but it also contains file2.

Tags: vmdk vmware
Revision history for this message
OpenStack Infra (hudson-openstack) wrote : Fix proposed to cinder (master)

Fix proposed to branch: master
Review: https://review.openstack.org/50371

Changed in cinder:
assignee: nobody → Kartik Bommepally (kartikaditya)
status: New → In Progress
Revision history for this message
OpenStack Infra (hudson-openstack) wrote : Fix merged to cinder (master)

Reviewed: https://review.openstack.org/50371
Committed: http://github.com/openstack/cinder/commit/2451a027bee50c834890f9e049fbaf4bfa911546
Submitter: Jenkins
Branch: master

commit 2451a027bee50c834890f9e049fbaf4bfa911546
Author: Kartik Bommepally <email address hidden>
Date: Tue Oct 8 06:33:33 2013 -0700

    VMware: Disallow snapshot of attached volume

    The current implementation perform snapshot of attached volume.
    This is invalid because when we take snapshot of the backing, the instance
    continues pointing to the readonly delta and tries writing to it.
    This patch will disallow snapshot creation of attached volume.

    We have similar issue with delete of snapshot, when deleted the instance will
    point to an invalid disk file, since that will get merged with its parent.
    Hence any writes by the instance will fail with disk not found error.
    This patch will ignore delete snapshot of attached volume.

    Since we disallow snapshot of attached volume, we disallow linked clone of
    attached source volume and also upload of attached volume.

    Fixes bug: 1236891

    Change-Id: I6a91eac8529836d1fe1de73bf6b28ec098aa7c54

Changed in cinder:
status: In Progress → Fix Committed
Thierry Carrez (ttx)
Changed in cinder:
importance: Undecided → Medium
milestone: none → havana-rc2
tags: removed: havana-rc-potential
Revision history for this message
OpenStack Infra (hudson-openstack) wrote : Fix proposed to cinder (milestone-proposed)

Fix proposed to branch: milestone-proposed
Review: https://review.openstack.org/50959

Revision history for this message
OpenStack Infra (hudson-openstack) wrote : Fix merged to cinder (milestone-proposed)

Reviewed: https://review.openstack.org/50959
Committed: http://github.com/openstack/cinder/commit/3c7bfcdb378ca7f59186822f4c905e1176e4722a
Submitter: Jenkins
Branch: milestone-proposed

commit 3c7bfcdb378ca7f59186822f4c905e1176e4722a
Author: Kartik Bommepally <email address hidden>
Date: Tue Oct 8 06:33:33 2013 -0700

    VMware: Disallow snapshot of attached volume

    The current implementation perform snapshot of attached volume.
    This is invalid because when we take snapshot of the backing, the instance
    continues pointing to the readonly delta and tries writing to it.
    This patch will disallow snapshot creation of attached volume.

    We have similar issue with delete of snapshot, when deleted the instance will
    point to an invalid disk file, since that will get merged with its parent.
    Hence any writes by the instance will fail with disk not found error.
    This patch will ignore delete snapshot of attached volume.

    Since we disallow snapshot of attached volume, we disallow linked clone of
    attached source volume and also upload of attached volume.

    Fixes bug: 1236891

    Change-Id: I6a91eac8529836d1fe1de73bf6b28ec098aa7c54
    (cherry picked from commit 2451a027bee50c834890f9e049fbaf4bfa911546)

Changed in cinder:
status: Fix Committed → Fix Released
Thierry Carrez (ttx)
Changed in cinder:
milestone: havana-rc2 → 2013.2
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.