Bug 1338526

Summary: HE VM auto-import failed with NullPointerException
Product: [oVirt] ovirt-engine Reporter: Artyom <alukiano>
Component: BLL.HostedEngineAssignee: Tal Nisan <tnisan>
Status: CLOSED CURRENTRELEASE QA Contact: Artyom <alukiano>
Severity: urgent Docs Contact:
Priority: unspecified    
Version: 4.0.0CC: alukiano, amureini, bugs, tnisan
Target Milestone: ovirt-4.0.0-rcKeywords: AutomationBlocker, Regression, Triaged
Target Release: 4.0.0Flags: rule-engine: ovirt-4.0.0+
rule-engine: blocker+
rule-engine: planning_ack+
tnisan: devel_ack+
rule-engine: testing_ack+
Hardware: x86_64   
OS: Linux   
Fixed In Version: Doc Type: If docs needed, set a value
Doc Text:
Story Points: ---
Clone Of: Environment:
Last Closed: 2016-07-05 07:38:42 UTC Type: Bug
Regression: --- Mount Type: ---
Documentation: --- CRM:
Verified Versions: Category: ---
oVirt Team: Storage RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: --- Target Upstream Version:
Description Flags
engine log none

Description Artyom 2016-05-22 14:07:04 UTC
Created attachment 1160306 [details]
engine log

Description of problem:
HE VM auto-import failed with NullPointerException

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

How reproducible:

Steps to Reproduce:
1. Deploy HE on NFS storage
2. Add NFS storage domain to engine
3. Wait for HE VM auto import

Actual results:
I see that engine success to auto-import HE storage domain, but fails to auto-import HE VM

Expected results:
HE storage and VM auto-import must succeed

Additional info:
Tried it only on NFS storage, so I can not be sure that the same behaviour exists also for other storages.

Comment 1 Yaniv Kaul 2016-05-23 06:51:05 UTC
It's also a good idea to put the first few lines of the NPE in the bug description:
1. It gives a good hint where the issue is.
2. It allows to search for it later (to find duplicates).

Comment 2 Roy Golan 2016-05-23 07:07:17 UTC
2016-05-22 14:05:51,823 ERROR [org.ovirt.engine.core.bll.exportimport.ImportVmCommand] (org.ovirt.thread.pool-8-thread-18) [] Exception: java.lang.NullPointerException
	at org.ovirt.engine.core.common.businessentities.storage.BaseDisk.setDiskVmElements(BaseDisk.java:83) [common.jar:]
	at org.ovirt.engine.core.bll.VmHandler.updateDisksVmDataForVm(VmHandler.java:338) [bll.jar:]
	at org.ovirt.engine.core.bll.utils.VmDeviceUtils.updateBootOrder(VmDeviceUtils.java:991) [bll.jar:]
	at org.ovirt.engine.core.bll.utils.VmDeviceUtils.addManagedDevice(VmDeviceUtils.java:1398) [bll.jar:]
	at org.ovirt.engine.core.bll.utils.VmDeviceUtils.addDiskDevice(VmDeviceUtils.java:936) [bll.jar:]
	at org.ovirt.engine.core.bll.utils.VmDeviceUtils.addDiskDevice(VmDeviceUtils.java:920) [bll.jar:]
	at org.ovirt.engine.core.bll.utils.VmDeviceUtils.addImportedDiskDevices(VmDeviceUtils.java:1432) [bll.jar:]
	at org.ovirt.engine.core.bll.utils.VmDeviceUtils.addImportedDevices(VmDeviceUtils.java:1415) [bll.jar:]
	at org.ovirt.engine.core.bll.exportimport.ImportVmCommand.lambda$processImages$0(ImportVmCommand.java:606) [bll.jar:]

Looks like its related to commit 6e55d137d5ca32085da8c4d2bf2b6841463422ae "core: Move disks boot and interface properties to DiskVmelement" 

Tal this is your change, can you have a peek?

Comment 3 Artyom 2016-05-23 08:44:10 UTC
See please comment 2

Comment 4 Red Hat Bugzilla Rules Engine 2016-05-24 07:10:36 UTC
Bug tickets must have version flags set prior to targeting them to a release. Please ask maintainer to set the correct version flags and only then set the target milestone.

Comment 5 Red Hat Bugzilla Rules Engine 2016-05-24 07:58:09 UTC
Bug tickets must have version flags set prior to targeting them to a release. Please ask maintainer to set the correct version flags and only then set the target milestone.

Comment 6 Artyom 2016-06-06 14:28:45 UTC

Comment 7 Artyom 2016-06-06 14:29:29 UTC
Verified on rhevm-

Checked on ISCSI and NFS storages

Comment 8 Sandro Bonazzola 2016-07-05 07:38:42 UTC
oVirt 4.0.0 has been released, closing current release.