Bug 1039468

Summary: Exception for corrupted ovf in export domain, is not sent to engine log.
Product: Red Hat Enterprise Virtualization Manager Reporter: Ilanit Stein <istein>
Component: ovirt-engineAssignee: Roy Golan <rgolan>
Status: CLOSED CURRENTRELEASE QA Contact: Ilanit Stein <istein>
Severity: medium Docs Contact:
Priority: unspecified    
Version: 3.3.0CC: acathrow, iheim, istein, lpeer, mavital, michal.skrivanek, ofrenkel, rgolan, Rhev-m-bugs, rjones, rnori, sherold, yeylon
Target Milestone: ---Keywords: Reopened
Target Release: 3.4.0   
Hardware: Unspecified   
OS: Unspecified   
Whiteboard: virt
Fixed In Version: org.ovirt.engine-root-3.4.0-14 Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of: Environment:
Last Closed: 2014-09-17 09:07:14 UTC Type: Bug
Regression: --- Mount Type: ---
Documentation: --- CRM:
Verified Versions: Category: ---
oVirt Team: --- RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: --- Target Upstream Version:

Description Ilanit Stein 2013-12-09 08:21:28 UTC
Description of problem:
	
In case of corrupted ovf (VM/template) in export domain, access to the ovf list generate exception in the code. This exception is NOT sent to the engine log.

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

How reproducible:
100%

Steps to Reproduce:
1. Have corrupted ovf vm/template in export domain
2. Go to export domain OR, 
   Refresh export domain OR,  
   Import / Export VM from/to export domain.

Additional info:
The event message, generated in this case:
"Failed to read VM '[Empty Name]' OVF, it may be corrupted"
There is a separate bug (#1036635) regarding this event.

Comment 1 Omer Frenkel 2013-12-12 07:18:32 UTC
i dont understand, you complain the code caught the exception (how do you know there is an exception if its not logged?) and logged a nice error in the audit log?
it is not clear what is the issue here, please elaborate, what is missing/what did you expect?

please also attach relevant engine.log

Comment 2 Ilanit Stein 2013-12-18 09:11:11 UTC
Following the exception event, looking in the engine.log, showed no error. 
rgolan found in the code, that the exception is NOT sent to the engine.log.
For this purpose I opened this bug.

Comment 3 Ravi Nori 2013-12-18 15:39:48 UTC
In current master and I see a log entry in engine.log.

2013-12-18 10:28:07,935 INFO  [org.ovirt.engine.core.dal.dbbroker.auditloghandling.AuditLogDirector] (http--0.0.0.0-8080-1) Correlation ID: null, Call Stack: null, Custom Event ID: -1, Message: Failed to read VM '[Unknown name]' OVF, it may be corrupted

Comment 4 Omer Frenkel 2013-12-19 07:43:42 UTC
we could improve the engine.log with the exception message, as it may provide some more info on the error.

Comment 5 Ilanit Stein 2014-04-30 13:06:46 UTC
Verified on av7:

I've corrupted an ovf of a vm in export VM, by deleting several chars from it. 
and when doing refresh of the export domain VM list, generate these engine.log messages:
 
014-04-30 15:55:03,311 ERROR [org.ovirt.engine.core.utils.ovf.OvfParser] (ajp-/127.0.0.1:8702-4) Failed Parsing OVF due to A pseudo attribute name is expected.  
2014-04-30 15:55:03,318 INFO  [org.ovirt.engine.core.dal.dbbroker.auditloghandling.AuditLogDirector] (ajp-/127.0.0.1:8702-4) Correlation ID: null, Call Stack: null, Custom Event ID: -1, Message: Failed to read VM '[Empty Name]' OVF, it may be corrupted

Comment 6 Itamar Heim 2014-06-12 14:11:26 UTC
Closing as part of 3.4.0

Comment 7 Richard W.M. Jones 2014-09-16 22:28:29 UTC
What was the resolution here?

Comment 8 Ilanit Stein 2014-09-17 06:32:59 UTC
Adding needinfo flag for rgolan to answer comment # 7

Comment 9 Roy Golan 2014-09-17 06:38:05 UTC
why is this NEW again?

Comment 10 Ilanit Stein 2014-09-17 07:45:16 UTC
(In reply to Richard W.M. Jones from comment #7)
> What was the resolution here?

In case your question refer to verification, it was verified that the 
Exception for corrupted ovf in export domain, is INDEED sent to engine log.

Comment 11 Richard W.M. Jones 2014-09-17 09:07:14 UTC
Fair enough.  However the underlying bug (that there is no useful
information in the exception) is not fixed.