Francesco Romani has submitted this change and it was merged.
Change subject: v2v: Fix getExternalVMs if getting disk size failed
......................................................................
v2v: Fix getExternalVMs if getting disk size failed
In getExternalVMs we try to report the disk size, but if this info is
not available for certain disk, we continue to collect info about other
disks. Due to incorrect error handling, the request was aborted after
the first error:
File "/usr/share/vdsm/v2v.py", line 684, in _add_disk_info
disk['capacity'] = str(capacity)
UnboundLocalError: local variable 'capacity' referenced before assignment
This patch fixes the error handling so failure to get disk size would
not fail the entire request.
Change-Id: I7e91190a255a4d9bd2f474e125c49b18e3d3bfd4
Reported-by: Ian Fraser <ian.fraser(a)asm.org.uk>
Bug-Url:
https://bugzilla.redhat.com/1265556
Backport-to: 3.6
Signed-off-by: Nir Soffer <nsoffer(a)redhat.com>
Reviewed-on:
https://gerrit.ovirt.org/46540
Reviewed-by: Francesco Romani <fromani(a)redhat.com>
Continuous-Integration: Jenkins CI
Reviewed-on:
https://gerrit.ovirt.org/47362
Tested-by: Francesco Romani <fromani(a)redhat.com>
Reviewed-by: Shahar Havivi <shavivi(a)redhat.com>
---
M vdsm/v2v.py
1 file changed, 3 insertions(+), 3 deletions(-)
Approvals:
Nir Soffer: Looks good to me, but someone else must approve
Shahar Havivi: Looks good to me, but someone else must approve
Jenkins CI: Passed CI tests
Francesco Romani: Verified; Looks good to me, approved
--
To view, visit
https://gerrit.ovirt.org/47362
To unsubscribe, visit
https://gerrit.ovirt.org/settings
Gerrit-MessageType: merged
Gerrit-Change-Id: I7e91190a255a4d9bd2f474e125c49b18e3d3bfd4
Gerrit-PatchSet: 2
Gerrit-Project: vdsm
Gerrit-Branch: ovirt-3.6
Gerrit-Owner: Francesco Romani <fromani(a)redhat.com>
Gerrit-Reviewer: Francesco Romani <fromani(a)redhat.com>
Gerrit-Reviewer: Jenkins CI
Gerrit-Reviewer: Nir Soffer <nsoffer(a)redhat.com>
Gerrit-Reviewer: Shahar Havivi <shavivi(a)redhat.com>
Gerrit-Reviewer: automation(a)ovirt.org