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

Bug 1497620

Summary: GetAllDisksWithSnapshotsQuery fails with NullPointerException
Product: [oVirt] ovirt-engine Reporter: Elad <ebenahar>
Component: Backend.CoreAssignee: Eyal Shenitzky <eshenitz>
Status: CLOSED DUPLICATE QA Contact: meital avital <mavital>
Severity: high Docs Contact:
Priority: unspecified    
Version: 4.2.0CC: amureini, bugs, ebenahar
Target Milestone: ovirt-4.2.0Keywords: Automation, Regression
Target Release: ---Flags: rule-engine: ovirt-4.2+
rule-engine: blocker+
Hardware: x86_64   
OS: Unspecified   
Whiteboard:
Fixed In Version: Doc Type: If docs needed, set a value
Doc Text:
Story Points: ---
Clone Of: Environment:
Last Closed: 2017-10-23 08:22: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:
Embargoed:
Attachments:
Description Flags
engine.log, db dump, server.log and vdsm.log none

Description Elad 2017-10-02 08:31:07 UTC
Created attachment 1333133 [details]
engine.log, db dump, server.log and vdsm.log

Description of problem:

GetAllDisksWithSnapshotsQuery fails with the following exception:

2017-10-02 09:53:00,318+03 ERROR [org.ovirt.engine.core.bll.storage.disk.GetAllDisksWithSnapshotsQuery] (default task-32) [7c764d21-114d-451c-8a09-b87b27ecfd43] Query 'GetAllDisksWithSnapsh
otsQuery' failed: null
2017-10-02 09:53:00,318+03 ERROR [org.ovirt.engine.core.bll.storage.disk.GetAllDisksWithSnapshotsQuery] (default task-32) [7c764d21-114d-451c-8a09-b87b27ecfd43] Exception: java.lang.NullPointerException
        at org.ovirt.engine.core.bll.storage.disk.image.ImagesHandler.lambda$aggregateDiskImagesSnapshots$7(ImagesHandler.java:567) [bll.jar:]
        at java.util.ArrayList.forEach(ArrayList.java:1249) [rt.jar:1.8.0_144]
        at org.ovirt.engine.core.bll.storage.disk.image.ImagesHandler.aggregateDiskImagesSnapshots(ImagesHandler.java:565) [bll.jar:]
        at org.ovirt.engine.core.bll.storage.disk.GetAllDisksWithSnapshotsQuery.aggregateDisksSnapshots(GetAllDisksWithSnapshotsQuery.java:54) [bll.jar:]
        at org.ovirt.engine.core.bll.storage.disk.GetAllDisksWithSnapshotsQuery.executeQueryCommand(GetAllDisksWithSnapshotsQuery.java:36) [bll.jar:]
        at org.ovirt.engine.core.bll.QueriesCommandBase.executeCommand(QueriesCommandBase.java:106) [bll.jar:]
        at org.ovirt.engine.core.dal.VdcCommandBase.execute(VdcCommandBase.java:33) [dal.jar:]
        at org.ovirt.engine.core.bll.executor.DefaultBackendQueryExecutor.execute(DefaultBackendQueryExecutor.java:14) [bll.jar:]



Version-Release number of selected component (if applicable):
ovirt-engine-4.2.0-0.0.master.20170925172449.git9d850a9.el7.centos.noarch
rh-postgresql95-postgresql-server-9.5.7-2.el7.x86_64
vdsm-4.20.3-95.git0813890.el7.centos.x86_64


How reproducible:
Reproduced in RHV automation tests.
GetAllDisksWithSnapshotsQuery fails all the time on this specific setup. There are some disks in state locked, this might be related.


Steps to Reproduce:
Not sure about the exact steps, it seems to be happening after VM creation as thin copy from a template, but it might be that the GetAllDisksWithSnapshotsQuery is triggered in our automation as part of VM creation.



Additional info:
engine.log, db dump, server.log and vdsm.log

Comment 1 Allon Mureinik 2017-10-02 11:38:58 UTC
Eyal, please take a look.

I *think* this is a dup of bug 1496805, but please confirm (and close) or refute (and fix)

Comment 2 Eyal Shenitzky 2017-10-16 07:43:39 UTC
Elad,

Can you please check whether it is reproduced with the latest version of the engine?

Also, pls try to add steps to reproduce.

Comment 3 Elad 2017-10-23 07:58:31 UTC
Couldn't reproduce in latest builds

Comment 4 Allon Mureinik 2017-10-23 08:22:42 UTC
So this probably is indeed a dup of bug 1496805 (or, at the very least, has the same root cause).
I'm closing this BZ, please reopen it if you see the problem reoccuring.

*** This bug has been marked as a duplicate of bug 1496805 ***