]> review.fuel-infra Code Review - openstack-build/cinder-build.git/commit
VMware: Disallow snapshot of attached volume
authorKartik Bommepally <kbommepally@vmware.com>
Tue, 8 Oct 2013 13:33:33 +0000 (06:33 -0700)
committerJohn Griffith <john.griffith@solidfire.com>
Thu, 10 Oct 2013 15:36:15 +0000 (09:36 -0600)
commit3c7bfcdb378ca7f59186822f4c905e1176e4722a
tree9b5f5da497c4bfb3f81a00b2064b013c8a771cef
parentf021629df31328324ca429c29a827efab832eee0
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)
cinder/tests/test_vmware_vmdk.py
cinder/volume/drivers/vmware/vmdk.py