]> review.fuel-infra Code Review - openstack-build/cinder-build.git/commit
VMware: Relocate volume only during no disk space
authorVipin Balachandran <vbala@vmware.com>
Tue, 13 Oct 2015 06:49:08 +0000 (12:19 +0530)
committerVipin Balachandran <vbala@vmware.com>
Fri, 16 Oct 2015 06:41:26 +0000 (12:11 +0530)
commit882175e37b4f184dd0996c14afdae744fc36a7cc
tree62acc98e328600080582567dee4d723c3d63508d
parent3b0fcc3e758b6763d93aa2cea40aa46748201e99
VMware: Relocate volume only during no disk space

During volume extend, we try to relocate the volume to a
different datastore if there is an error during vCenter
extend API call. But we need to relocate the volume to a
different datastore only if there is no space in the
current datastore to accommodate the extended volume. This
patch fixes the issue by relocating the volume only if the
exception raised is NoDiskSpaceException. It also refactors
the code to remove a redundant helper method for extending
virtual disk.

Closes-Bug: #1506422
Change-Id: Ic64eb697b49ffb3a435ffc4d969b5b7f79af91c6
cinder/tests/unit/test_vmware_vmdk.py
cinder/volume/drivers/vmware/vmdk.py
cinder/volume/drivers/vmware/volumeops.py