Bug 1337909

Summary: NPE when trying to add a direct LUN disk
Product: [oVirt] ovirt-engine Reporter: Yaniv Kaul <ykaul>
Component: BLL.StorageAssignee: Tal Nisan <tnisan>
Status: CLOSED CURRENTRELEASE QA Contact: Kevin Alon Goldblatt <kgoldbla>
Severity: high Docs Contact:
Priority: medium    
Version: 4.0.0CC: amureini, bugs, tnisan
Target Milestone: ovirt-4.0.0-rcKeywords: Regression
Target Release: 4.0.0Flags: rule-engine: ovirt-4.0.0+
rule-engine: blocker+
rule-engine: planning_ack+
amureini: devel_ack+
acanan: testing_ack+
Hardware: x86_64   
OS: All   
Whiteboard:
Fixed In Version: Doc Type: If docs needed, set a value
Doc Text:
Story Points: ---
Clone Of: Environment:
Last Closed: 2016-07-05 07:43:51 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:
Embargoed:
Attachments:
Description Flags
engine.log none

Description Yaniv Kaul 2016-05-20 12:26:27 UTC
Created attachment 1159894 [details]
engine.log

Description of problem:
When trying to add an iSCSI based direct LUN as a disk to a VM, I'm getting the following NPE. Same code works well on 3.6.x:
2016-05-20 06:40:40,338 ERROR [org.ovirt.engine.core.bll.storage.disk.AddDiskCommand] (default task-23) [5cf133a8] Command 'org.ovirt.engine.core.bll.storage.disk.AddDiskCommand' failed: null
2016-05-20 06:40:40,338 ERROR [org.ovirt.engine.core.bll.storage.disk.AddDiskCommand] (default task-23) [5cf133a8] 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:928) [bll.jar:]
        at org.ovirt.engine.core.bll.storage.disk.AddDiskCommand.addManagedDeviceForDisk(AddDiskCommand.java:467) [bll.jar:]
        at org.ovirt.engine.core.bll.storage.disk.AddDiskCommand.lambda$createDiskBasedOnLun$0(AddDiskCommand.java:456) [bll.jar:]
        at org.ovirt.engine.core.utils.transaction.TransactionSupport.executeInNewTransaction(TransactionSupport.java:204) [utils.jar:]
        at org.ovirt.engine.core.bll.storage.disk.AddDiskCommand.createDiskBasedOnLun(AddDiskCommand.java:451) [bll.jar:]
        at org.ovirt.engine.core.bll.storage.disk.AddDiskCommand.executeVmCommand(AddDiskCommand.java:428) [bll.jar:]


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


How reproducible:


Steps to Reproduce:
1.
2.
3.

Actual results:


Expected results:


Additional info:

Comment 1 Red Hat Bugzilla Rules Engine 2016-05-20 12:26:32 UTC
This bug report has Keywords: Regression or TestBlocker.
Since no regressions or test blockers are allowed between releases, it is also being identified as a blocker for this release. Please resolve ASAP.

Comment 2 Yaniv Kaul 2016-05-20 12:28:18 UTC
Tal - possible regression due to your recent changes?

Test code is @ https://gerrit.ovirt.org/#/c/57792/

Comment 3 Allon Mureinik 2016-05-22 04:31:17 UTC
(In reply to Yaniv Kaul from comment #2)
> Tal - possible regression due to your recent changes?
> 
> Test code is @ https://gerrit.ovirt.org/#/c/57792/
Probably. Tal, please take care of this ASAP?

Comment 4 Yaniv Lavi 2016-05-23 13:14:57 UTC
oVirt 4.0 beta has been released, moving to RC milestone.

Comment 5 Yaniv Lavi 2016-05-23 13:19:14 UTC
oVirt 4.0 beta has been released, moving to RC milestone.

Comment 6 Yaniv Kaul 2016-06-22 11:59:03 UTC
Closed-upstream - works well in Lago.

Comment 7 Sandro Bonazzola 2016-07-05 07:43:51 UTC
oVirt 4.0.0 has been released, closing current release.