Bug 1394564 - Adding direct LUN disk via REST API is failed with NullPointerException
Summary: Adding direct LUN disk via REST API is failed with NullPointerException
Keywords:
Status: CLOSED CURRENTRELEASE
Alias: None
Product: ovirt-engine
Classification: oVirt
Component: BLL.Storage
Version: 4.1.0
Hardware: Unspecified
OS: Unspecified
unspecified
high
Target Milestone: ovirt-4.1.0-alpha
: 4.1.0.2
Assignee: Tal Nisan
QA Contact: Raz Tamir
URL:
Whiteboard:
Depends On:
Blocks:
TreeView+ depends on / blocked
 
Reported: 2016-11-13 15:59 UTC by Raz Tamir
Modified: 2017-02-01 14:40 UTC (History)
3 users (show)

Fixed In Version:
Doc Type: If docs needed, set a value
Doc Text:
Clone Of:
Environment:
Last Closed: 2017-02-01 14:40:43 UTC
oVirt Team: Storage
Embargoed:
rule-engine: ovirt-4.1+
rule-engine: blocker+
tnisan: devel_ack+


Attachments (Terms of Use)
vdsm and engine logs (1.60 MB, application/x-gzip)
2016-11-13 15:59 UTC, Raz Tamir
no flags Details


Links
System ID Private Priority Status Summary Last Updated
oVirt gerrit 66599 0 master MERGED core: Fix validation when creating floating direct LUN 2016-11-14 12:52:35 UTC

Description Raz Tamir 2016-11-13 15:59:23 UTC
Created attachment 1220167 [details]
vdsm and engine logs

Description of problem:
When trying to add a direct LUN disk via the REST API, the operation will fail and in the engine.log a NullPointerException is raised:
2016-11-13 17:47:31,418 ERROR [org.ovirt.engine.core.bll.storage.disk.AddDiskCommand] (default task-11) [dfd828c5-14cc-4878-a150-2d6aecde55f0] Error during ValidateFailure.: java.lang.NullPointerException
	at org.ovirt.engine.core.bll.validator.storage.DiskValidator.isUsingScsiReservationValid(DiskValidator.java:101) [bll.jar:]



Version-Release number of selected component (if applicable):
ovirt-engine-4.1.0-0.0.master.20161111231310.gitd12e6f1.el7.centos.noarch


How reproducible:
100%

Steps to Reproduce:
1. Add a direct LUN using REST API:
Send POST command to /api/disks:

Body:
<disk>
    <alias>direct_lun_test</alias>
    <bootable>false</bootable>
    <format>cow</format>
    <interface>virtio_scsi</interface>
    <lun_storage>
        <logical_units>
            <logical_unit id="3514f0c5a5160046f">
                <address>10.35.146.129</address>
                <port>3260</port>
                <target>iqn.2008-05.com.xtremio:xio00153500071-514f0c50023f6c00</target>
            </logical_unit>
        </logical_units>
        <type>iscsi</type>
    </lun_storage>
    <provisioned_size>1073741824</provisioned_size>
</disk>

Response --> 500 Internal Server Error
Body -->
<fault>
    <detail>[General command validation failure.]</detail>
    <reason>Operation Failed</reason>
</fault>

2.
3.

Actual results:


Expected results:


Additional info:

Comment 1 Yaniv Kaul 2016-11-13 16:18:29 UTC
How can you add a DirectLUN with cow format? Did it work before? Would be interesting to see how it passes in ovirt-system-tests and fails here.

Comment 2 Raz Tamir 2016-11-13 16:34:01 UTC
You can see this bug https://bugzilla.redhat.com/show_bug.cgi?id=1225337 which was the reason for the regression flag, and this bug https://bugzilla.redhat.com/show_bug.cgi?id=1083096 which is the reason for the cow format in the POST body (leftover in our code)

Comment 3 Tal Nisan 2016-11-13 17:02:32 UTC
Raz, next time unless it's an ongoing issue please try to trim the logs right before running the action, no point in having a few MBs of logs from the entire day, it clutters the relevant part

Comment 4 Raz Tamir 2016-11-27 13:54:46 UTC
Verified on -  
ovirt-engine-4.1.0-0.0.master.20161126211319.gitae69c34.el7.centos.noarch

Comment 5 Sandro Bonazzola 2016-12-12 13:58:59 UTC
The fix for this issue should be included in oVirt 4.1.0 beta 1 released on December 1st. If not included please move back to modified.

Comment 6 Raz Tamir 2016-12-13 17:23:59 UTC
Verified on Verified on 4.1.0-0.2.master.20161212071212.git8a015dd.el7.centos

Comment 7 Red Hat Bugzilla Rules Engine 2016-12-27 16:39:45 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.


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