]> review.fuel-infra Code Review - openstack-build/cinder-build.git/commit
Windows SMBFS: Fix image resize errors during volume creation
authorLucian Petrut <lpetrut@cloudbasesolutions.com>
Fri, 27 Mar 2015 13:00:28 +0000 (15:00 +0200)
committerLucian Petrut <lpetrut@cloudbasesolutions.com>
Mon, 11 May 2015 13:08:35 +0000 (16:08 +0300)
commit3fe6adbe7d3e2009c09dd0b8516c501d50fdf25d
treefc40ea942023d5d14cf89c55972efbae14c4ffa6
parent5afa79cd4b2724c1bb87258683af03f558959b47
Windows SMBFS: Fix image resize errors during volume creation

When creating volumes from images or snapshots, the corresponding
virtual disk image is resized up to the volume size.

At the moment, the resize is performed even if the image already
has the requested size. This can raise an excepion in some
environments.

This patch checks the image size and performs the resize only if
it's required.

Change-Id: Ib65f0e8d69f93ae21975eb46ba24e085c06e4e34
Closes-Bug: #1437306
cinder/tests/unit/test_smbfs.py
cinder/tests/unit/windows/test_smbfs.py
cinder/volume/drivers/windows/smbfs.py
cinder/volume/drivers/windows/windows_utils.py