Bugzilla (bugzilla.redhat.com) will be under maintenance for infrastructure upgrades and will not be available on July 31st between 12:30 AM - 05:30 AM UTC. We appreciate your understanding and patience. You can follow status.redhat.com for details.
Bug 1411080 - template creation from a VM with direct lun disk fails with NPE @ storage.DiskVmElementValidator.getDiskId(
Summary: template creation from a VM with direct lun disk fails with NPE @ storage.Di...
Status: CLOSED DUPLICATE of bug 1409995
Alias: None
Product: ovirt-engine
Classification: oVirt
Component: BLL.Storage
Version: 4.1.0
Hardware: Unspecified
OS: Unspecified
Target Milestone: ovirt-4.1.0-beta
: ---
Assignee: Tal Nisan
QA Contact: Raz Tamir
Depends On:
TreeView+ depends on / blocked
Reported: 2017-01-08 09:10 UTC by Avihai
Modified: 2017-01-09 10:19 UTC (History)
1 user (show)

Fixed In Version:
Doc Type: If docs needed, set a value
Doc Text:
Clone Of:
Last Closed: 2017-01-09 10:19:21 UTC
oVirt Team: Storage
tnisan: ovirt-4.1?

Attachments (Terms of Use)
engine & vdsm logs (418.75 KB, application/x-gzip)
2017-01-08 09:10 UTC, Avihai
no flags Details

Description Avihai 2017-01-08 09:10:09 UTC
Created attachment 1238323 [details]
engine & vdsm logs

Description of problem:
template creation from a VM with direct lun disk  fails with Error during ValidateFailure.: java.lang.NullPointerException

Version-Release number of selected component (if applicable):
oVirt Engine Version: 4.1.0-0.4.master.20170105161132.gitf4e2c11.el7.centos

How reproducible:

Steps to Reproduce:
1.create VM with a bootable disk ( VM in down state)
2.create a direct lun disk (type virtio_scsi)  
3.attach direct lun disk to VM .
4.create a template from the VM 

Actual results:
creation fails with the following engine error:

2017-01-08 10:49:58,265+02 ERROR [org.ovirt.engine.core.bll.AddVmTemplateCommand] (default task-6) [a6489eca-f064-4350-b5fd-4f1a29baeac6] Error during ValidateFailure.: java.lang.NullPointerException

Expected results:
No error should occur.

Additional info:
This was tested both with GUI & REST API.

10 first lines of Engine Error (the rest is in the  engine log file) :

2017-01-08 10:33:08,040+02 ERROR [org.ovirt.engine.core.bll.AddVmTemplateCommand] (default task-16) [templates_create_dcc81d23-8cf4-4f00] Error during ValidateFailure.: java.lang.NullPointerException
        at org.ovirt.engine.core.bll.validator.storage.DiskVmElementValidator.getDiskId(DiskVmElementValidator.java:31) [bll.jar:]
        at org.ovirt.engine.core.bll.validator.storage.MultipleDiskVmElementValidator.lambda$isPassDiscardSupportedForDestSds$2(MultipleDiskVmElementValidator.java:48) [bll.jar:]
        at java.util.stream.ReferencePipeline$3$1.accept(ReferencePipeline.java:193) [rt.jar:1.8.0_111]
        at java.util.ArrayList$ArrayListSpliterator.tryAdvance(ArrayList.java:1351) [rt.jar:1.8.0_111]
        at java.util.stream.ReferencePipeline.forEachWithCancel(ReferencePipeline.java:126) [rt.jar:1.8.0_111]
        at java.util.stream.AbstractPipeline.copyIntoWithCancel(AbstractPipeline.java:498) [rt.jar:1.8.0_111]
        at java.util.stream.AbstractPipeline.copyInto(AbstractPipeline.java:485) [rt.jar:1.8.0_111]
        at java.util.stream.AbstractPipeline.wrapAndCopyInto(AbstractPipeline.java:471) [rt.jar:1.8.0_111]
        at java.util.stream.FindOps$FindOp.evaluateSequential(FindOps.java:152) [rt.jar:1.8.0_111]

*API request:

1) Header:
name -> Content-Type
Value -> application/xml

2) Body
    <cluster id="a542c251-9856-4adf-88f6-9f2855424056"/>
    <vm id="1ea6c2be-d71e-42f6-8bcc-bf96ee9440aa"/>

3) Response:

    Status Code: 500 Internal Server Error
    Connection: close
    Content-Encoding: gzip
    Content-Length: 150
    Content-Type: application/xml
    Correlation-Id: a6489eca-f064-4350-b5fd-4f1a29baeac6
    Date: Sun, 08 Jan 2017 08:49:58 GMT
    Server: Apache/2.4.6 (Red Hat Enterprise Linux) OpenSSL/1.0.1e-fips

Comment 1 Yaniv Kaul 2017-01-08 09:18:43 UTC
Related or dup of bug 1409995 ?

Comment 2 Tal Nisan 2017-01-09 10:19:21 UTC
Couldn't reproduce after the fix for bug 1409995, reverted the fix to verify that it reproduces and confirmed that this is a duplicate indeed

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

Note You need to log in before you can comment on or make changes to this bug.