Note: This bug is displayed in read-only format because the product is no longer active in Red Hat Bugzilla.

Bug 1692332

Summary: virt-v2v: Import from VMware and Xen failed with NPE.
Product: [oVirt] ovirt-engine Reporter: Nisim Simsolo <nsimsolo>
Component: BLL.VirtAssignee: Shmuel Melamud <smelamud>
Status: CLOSED CURRENTRELEASE QA Contact: Nisim Simsolo <nsimsolo>
Severity: urgent Docs Contact:
Priority: unspecified    
Version: futureCC: bugs, bzlotnik, michal.skrivanek, nsimsolo
Target Milestone: ovirt-4.3.3Flags: pm-rhel: ovirt-4.3+
pm-rhel: blocker+
Target Release: ---   
Hardware: Unspecified   
OS: Unspecified   
Whiteboard:
Fixed In Version: ovirt-engine-4.3.3.1 Doc Type: If docs needed, set a value
Doc Text:
Story Points: ---
Clone Of: Environment:
Last Closed: 2019-04-16 13:58:19 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:
Attachments:
Description Flags
engine.log
none
vdsm.log none

Description Nisim Simsolo 2019-03-25 11:45:54 UTC
Description of problem:
Trying to import from Xen or VMware failed with engine.log NPE:
2019-03-25 13:40:51,954+02 ERROR [org.ovirt.engine.core.bll.exportimport.ImportVmFromExternalProviderCommand] (EE-ManagedThreadFactory-engine-Thread-1593) [25ed0574-6c17-4dd2-a39d-30b2539dffbd] Exception: java.lang.NullPointerException
        at org.ovirt.engine.core.bll.exportimport.ImportVmCommandBase.executeVmCommand(ImportVmCommandBase.java:480) [bll.jar:]
        at org.ovirt.engine.core.bll.VmCommand.executeCommand(VmCommand.java:172) [bll.jar:]
        at org.ovirt.engine.core.bll.CommandBase.executeWithoutTransaction(CommandBase.java:1157) [bll.jar:]
        at org.ovirt.engine.core.bll.CommandBase.executeActionInTransactionScope(CommandBase.java:1315) [bll.jar:]
        at org.ovirt.engine.core.bll.CommandBase.runInTransaction(CommandBase.java:1964) [bll.jar:]
        at org.ovirt.engine.core.utils.transaction.TransactionSupport.executeInSuppressed(TransactionSupport.java:164) [utils.jar:]
        at org.ovirt.engine.core.utils.transaction.TransactionSupport.executeInScope(TransactionSupport.java:103) [utils.jar:]
        at org.ovirt.engine.core.bll.CommandBase.execute(CommandBase.java:1375) [bll.jar:]
        at org.ovirt.engine.core.bll.CommandBase.executeAction(CommandBase.java:419) [bll.jar:]
        at org.ovirt.engine.core.bll.PrevalidatingMultipleActionsRunner.executeValidatedCommand(PrevalidatingMultipleActionsRunner.java:204) [bll.jar:]
        at org.ovirt.engine.core.bll.PrevalidatingMultipleActionsRunner.runCommands(PrevalidatingMultipleActionsRunner.java:176) [bll.jar:]
        at org.ovirt.engine.core.bll.PrevalidatingMultipleActionsRunner.lambda$invokeCommands$3(PrevalidatingMultipleActionsRunner.java:182) [bll.jar:]
        at org.ovirt.engine.core.utils.threadpool.ThreadPoolUtil$InternalWrapperRunnable.run(ThreadPoolUtil.java:96) [utils.jar:]
        at java.util.concurrent.Executors$RunnableAdapter.call(Executors.java:511) [rt.jar:1.8.0_201]
        at java.util.concurrent.FutureTask.run(FutureTask.java:266) [rt.jar:1.8.0_201]
        at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1149) [rt.jar:1.8.0_201]
        at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:624) [rt.jar:1.8.0_201]
        at java.lang.Thread.run(Thread.java:748) [rt.jar:1.8.0_201]
        at org.glassfish.enterprise.concurrent.ManagedThreadFactoryImpl$ManagedThread.run(ManagedThreadFactoryImpl.java:250) [javax.enterprise.concurrent-1.0.jar:]
        at org.jboss.as.ee.concurrent.service.ElytronManagedThreadFactory$ElytronManagedThread.run(ElytronManagedThreadFactory.java:78)


Version-Release number of selected component (if applicable):
ovirt-engine-4.4.0-0.0.master.20190323132107.git181b8fe.el7
libvirt-client-4.5.0-10.el7_6.6.x86_64
qemu-kvm-ev-2.12.0-18.el7_6.3.1.x86_64
vdsm-4.40.0-114.git8e34445.el7.x86_64
virt-v2v-1.38.2-12.el7_6.2.x86_64

How reproducible:
100%

Steps to Reproduce:
1. Try to import VM from Xen or VMware
2.
3.

Actual results:
Import failed.

Expected results:


Additional info:
engine.log and vdsm.log attached

Comment 1 Nisim Simsolo 2019-03-25 11:58:34 UTC
Created attachment 1547678 [details]
engine.log

Comment 2 Nisim Simsolo 2019-03-25 11:58:56 UTC
Created attachment 1547679 [details]
vdsm.log

Comment 3 Michal Skrivanek 2019-03-25 14:15:09 UTC
same code made it into 4.3, needs to be fixed in time

Comment 4 Michal Skrivanek 2019-03-25 14:17:57 UTC
regression from Benny's https://gerrit.ovirt.org/#/c/98690
since in this flow we import a "foreign" VM there's no update required when the entity doesn't exist, a simple null check should be enough.

Comment 5 Ryan Barry 2019-03-27 11:58:45 UTC
*** Bug 1692341 has been marked as a duplicate of this bug. ***

Comment 6 Ryan Barry 2019-03-27 11:59:06 UTC
*** Bug 1692374 has been marked as a duplicate of this bug. ***

Comment 7 Nisim Simsolo 2019-04-01 08:41:07 UTC
Reassigned,
Trying to virt-v2v import, failed with the same NPE.

Verification builds:
ovirt-engine-4.4.0-0.0.master.20190331184731.git44f6f4f.el7
vdsm-4.40.0-132.git1a56457.el7.x86_64
libvirt-client-4.5.0-10.el7_6.6.x86_64
qemu-kvm-ev-2.12.0-18.el7_6.3.1.x86_64
sanlock-3.6.0-1.el7.x86_64
virt-v2v-1.38.2-12.el7_6.2.x86_64

Comment 8 Nisim Simsolo 2019-04-03 08:20:59 UTC
verified_upstream:
ovirt-engine-4.4.0-0.0.master.20190401162605.git4822282.el7
vdsm-4.40.0-138.git00b6143.el7.x86_64
libvirt-client-4.5.0-10.el7_6.6.x86_64
qemu-kvm-ev-2.12.0-18.el7_6.3.1.x86_64
sanlock-3.6.0-1.el7.x86_64
virt-v2v-1.38.2-12.el7_6.2.x86_64

Verification scenarios:
1. Import from VMware
2. Import from Xen
3. Import from KVM
4. Import OVA file.

Comment 9 Raz Tamir 2019-04-04 21:30:07 UTC
QE verification bot: the bug was verified upstream

Comment 10 Sandro Bonazzola 2019-04-16 13:58:19 UTC
This bugzilla is included in oVirt 4.3.3 release, published on April 16th 2019.

Since the problem described in this bug report should be
resolved in oVirt 4.3.3 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.