]> review.fuel-infra Code Review - openstack-build/cinder-build.git/commit
Windows iSCSI: fix volume clone
authorLucian Petrut <lpetrut@cloudbasesolutions.com>
Tue, 24 Mar 2015 12:08:07 +0000 (14:08 +0200)
committerLucian Petrut <lpetrut@cloudbasesolutions.com>
Tue, 24 Mar 2015 13:54:21 +0000 (15:54 +0200)
commitfed458ef1ad367ef38196b92b9e87562bcc7bda6
treea5f563500916043207259963e3aa80f9625d30d6
parent37713115be3dec1a92e47906fa96d205d77a4274
Windows iSCSI: fix volume clone

In some environments, volume cloning fails when using the Windows
iSCSI volume driver. This involves creating a new VHD image and
copying the data from the source volume on top.

This can raise an error, caused by the fact that the destination
path exists.

This patch slightly changes the workflow used when cloning an image.
Instead of first creating a new WT disk and then copying the cloned
image data on top, the source image is copied, resized if needed
and then imported as a WT disk.

Change-Id: I07d45fa9324a34ef45ed2aa8051338ee6a0f8a5b
Closes-Bug: #1435865
cinder/tests/windows/test_windows.py
cinder/tests/windows/test_windows_utils.py
cinder/volume/drivers/windows/windows.py
cinder/volume/drivers/windows/windows_utils.py