Bug 1529965

Summary: OVA import: querying OVA file from import dialog failed with NullPointerException
Product: [oVirt] ovirt-engine Reporter: Nisim Simsolo <nsimsolo>
Component: BLL.VirtAssignee: Arik <ahadas>
Status: CLOSED CURRENTRELEASE QA Contact: Nisim Simsolo <nsimsolo>
Severity: high Docs Contact:
Priority: unspecified    
Version: 4.2.0.2CC: ahadas, bugs, lveyde, michal.skrivanek, nsimsolo
Target Milestone: ovirt-4.2.1Flags: rule-engine: ovirt-4.2+
rule-engine: planning_ack+
rule-engine: devel_ack+
mavital: testing_ack+
Target Release: ---   
Hardware: Unspecified   
OS: Unspecified   
Whiteboard:
Fixed In Version: ovirt-engine-4.2.1.1 Doc Type: Bug Fix
Doc Text:
Cause: Failure in querying OVF configuration from an OVA. Consequence: Users are unable to use the functionality of importing OVA files/folders in oVirt. Fix: The cause of the failure in querying OVF configuration from an OVA was fixed. Result: Importing OVA files/folders in oVirt works.
Story Points: ---
Clone Of: Environment:
Last Closed: 2018-02-12 11:58:11 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:
Bug Depends On:    
Bug Blocks: 1529255    
Attachments:
Description Flags
engine.log none

Description Nisim Simsolo 2017-12-31 13:35:10 UTC
Description of problem:
When trying to query OVA file to import from Webadmin, the action failed with the next engine log ERRORs: 
2017-12-31 15:26:24,537+02 ERROR [org.ovirt.engine.core.bll.GetVmFromOvaQuery] (default task-25) [517ffe15-40b7-40da-a270-f59bc546a947] Query 'GetVmFromOvaQuery' failed: null
2017-12-31 15:26:24,537+02 ERROR [org.ovirt.engine.core.bll.GetVmFromOvaQuery] (default task-25) [517ffe15-40b7-40da-a270-f59bc546a947] Exception: java.lang.NullPointerException
	at org.ovirt.engine.core.bll.GetVmFromOvaQuery.executeQueryCommand(GetVmFromOvaQuery.java:47) [bll.jar:]
.
.
.

Version-Release number of selected component (if applicable):
rhvm-4.2.0.2-0.1.el7
qemu-kvm-rhev-2.9.0-16.el7_4.13.x86_64
sanlock-3.5.0-1.el7.x86_64
libvirt-client-3.2.0-14.el7_4.5.x86_64
vdsm-4.20.9.3-1.el7ev.x86_64

How reproducible:
100%

Steps to Reproduce:
1. Browse Webadmin -> Compute -> Virtual machines -> more button -> Import
2. Select "Virtual appliance (OVA)" source and enter OVA path
3. Click "load" button

Actual results:
Action failed with the next Webadmin failure message:
"Failed to load VM configuration from OVA file: /home/nisim/rhel_7.ova
and with the next engine.log ERRORs:
2017-12-31 15:26:24,537+02 ERROR [org.ovirt.engine.core.bll.GetVmFromOvaQuery] (default task-25) [517ffe15-40b7-40da-a270-f59bc546a947] Query 'GetVmFromOvaQuery' failed: null
2017-12-31 15:26:24,537+02 ERROR [org.ovirt.engine.core.bll.GetVmFromOvaQuery] (default task-25) [517ffe15-40b7-40da-a270-f59bc546a947] Exception: java.lang.NullPointerException

Expected results:
OVA querying should not fail

Additional info:
engine.log attached

Comment 1 Nisim Simsolo 2017-12-31 13:38:19 UTC
Created attachment 1374935 [details]
engine.log

Comment 2 Yaniv Kaul 2017-12-31 14:46:07 UTC
Duplicate of bug 1529965 ?

Comment 5 Arik 2018-01-07 15:36:16 UTC
The posted fix is not enough, Ansible's default log-level was changed recently to verbose (https://gerrit.ovirt.org/#/c/85747/) and it seems to break this operation again. I'll post a fix.

Comment 6 Nisim Simsolo 2018-01-14 11:54:05 UTC
Verified:
rhvm-4.2.1.1-0.1.el7
qemu-kvm-rhev-2.9.0-16.el7_4.13.x86_64
libvirt-client-3.2.0-14.el7_4.7.x86_64
vdsm-4.20.13-1.el7ev.x86_64
sanlock-3.5.0-1.el7.x86_64

Comment 7 Sandro Bonazzola 2018-02-12 11:58:11 UTC
This bugzilla is included in oVirt 4.2.1 release, published on Feb 12th 2018.

Since the problem described in this bug report should be
resolved in oVirt 4.2.1 release, it has been closed with a resolution of CURRENT RELEASE.

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