Change in vdsm[master]: virt: Introduce Vm._setVolumeSize helper
alitke at redhat.com
alitke at redhat.com
Thu Apr 16 20:40:34 UTC 2015
Adam Litke has submitted this change and it was merged.
Change subject: virt: Introduce Vm._setVolumeSize helper
......................................................................
virt: Introduce Vm._setVolumeSize helper
We have two place invoking self.cif.irs.setVolumeSize(), ignoring errors
without documenting the reason. This patch adds Vm._setVolumeSize()
helper that raises on errors, eliminating such code.
We use setVolumeSize() when extending a disk. First we set volume size to
0, marking it as in transaction. Then we update the guest about the new
size via libvirt, and finally we store the new size in the volume.
In the first setVolumeSize() call setting volume size to 0, it is clear
that we want to fail the operation, so using _setVolumeSize() the
request fails without additional error handling code.
The second setVolumeSize() call updating the volume to the actual new
size is done after the vm was updated and can use the new device, so it
is not clear if we should fail the request or just warn about the
incorrect meta data in the volume (size=0). This patches changes the
behavior to fail the request in this case.
Change-Id: I742fde77a23387f89fa746c2030e151237cb230f
Signed-off-by: Nir Soffer <nsoffer at redhat.com>
Reviewed-on: https://gerrit.ovirt.org/37943
Reviewed-by: Francesco Romani <fromani at redhat.com>
Reviewed-by: Adam Litke <alitke at redhat.com>
---
M vdsm/virt/vm.py
1 file changed, 12 insertions(+), 5 deletions(-)
Approvals:
Nir Soffer: Verified
Adam Litke: Looks good to me, approved
Francesco Romani: Looks good to me, but someone else must approve
--
To view, visit https://gerrit.ovirt.org/37943
To unsubscribe, visit https://gerrit.ovirt.org/settings
Gerrit-MessageType: merged
Gerrit-Change-Id: I742fde77a23387f89fa746c2030e151237cb230f
Gerrit-PatchSet: 8
Gerrit-Project: vdsm
Gerrit-Branch: master
Gerrit-Owner: Nir Soffer <nsoffer at redhat.com>
Gerrit-Reviewer: Adam Litke <alitke at redhat.com>
Gerrit-Reviewer: Ala Hino <ahino at redhat.com>
Gerrit-Reviewer: Allon Mureinik <amureini at redhat.com>
Gerrit-Reviewer: Candace Sheremeta <cshereme at redhat.com>
Gerrit-Reviewer: Dan Kenigsberg <danken at redhat.com>
Gerrit-Reviewer: Federico Simoncelli <fsimonce at redhat.com>
Gerrit-Reviewer: Francesco Romani <fromani at redhat.com>
Gerrit-Reviewer: Nir Soffer <nsoffer at redhat.com>
Gerrit-Reviewer: automation at ovirt.org
Gerrit-Reviewer: oVirt Jenkins CI Server
More information about the vdsm-patches
mailing list