Bug 1261951

Summary: Improve error message when OVF cannot be parsed from export domain
Product: Red Hat Enterprise Virtualization Manager Reporter: Richard W.M. Jones <rjones>
Component: ovirt-engineAssignee: Shahar Havivi <shavivi>
Status: CLOSED ERRATA QA Contact: sefi litmanovich <slitmano>
Severity: medium Docs Contact:
Priority: medium    
Version: unspecifiedCC: amureini, bgraveno, gklein, lsurette, mavital, michal.skrivanek, rbalakri, Rhev-m-bugs, srevivo, ykaul
Target Milestone: ovirt-4.0.0-alpha   
Target Release: 4.0.0   
Hardware: Unspecified   
OS: Unspecified   
Whiteboard:
Fixed In Version: ovirt 4.0.0 alpha1 Doc Type: Bug Fix
Doc Text:
This update improves the error message written to the log when an OVF from the export domain cannot be parsed. The error message now attempts to pinpoint the problem.
Story Points: ---
Clone Of: Environment:
Last Closed: 2016-08-23 20:29:17 UTC Type: Bug
Regression: --- Mount Type: ---
Documentation: --- CRM:
Verified Versions: Category: ---
oVirt Team: Virt RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: --- Target Upstream Version:
Embargoed:

Description Richard W.M. Jones 2015-09-10 13:48:24 UTC
Description of problem:

When OVF from the export domain cannot be parsed, the error
message is deeply unhelpful.  eg:

https://bugzilla.redhat.com/show_bug.cgi?id=1261281#c5

  "Error parsing OVF due to 2"

Even including the stack trace as debug info would massively
improve the situation, because we could at least see exactly
where in the parser things were failing.

Version-Release number of selected component (if applicable):

ovirt 3.5

How reproducible:

100%

Steps to Reproduce:
1. Export any VM into the export storage domain.
2. Grab the OVF from
   https://bugzilla.redhat.com/show_bug.cgi?id=1261281#c5
3. Overwrite the VM's OVF in the ESD with the buggy OVF.
4. Go to the Storage -> Export tab
5. You will see an error message about corrupted OVF.
6. In engine.log you'll see the useless error message.

Comment 1 sefi litmanovich 2016-06-15 08:41:17 UTC
Verified with rhevm-4.0.0.2-0.1.el7ev.noarch according to steps in description.
After exporting the vm to export domain I changed the ovf on the ESD, played with several sections according to the attached patch.
Error message appears on audit log and engine log e.g.:

Failed to read VM '<UNKNOWN>' OVF, it may be corrupted. Underlying error message: OVF error: [Empty Name]: cannot read 'rasd:VirtualQuantity' with value: For input string: "hallo"

seems to be the expected result

Comment 3 errata-xmlrpc 2016-08-23 20:29:17 UTC
Since the problem described in this bug report should be
resolved in a recent advisory, it has been closed with a
resolution of ERRATA.

For information on the advisory, and where to find the updated
files, follow the link below.

If the solution does not work for you, open a new bug report.

https://rhn.redhat.com/errata/RHEA-2016-1743.html