Bug 864840 - Create ISCSI LUN Disk: Connection details should be mandatory
Summary: Create ISCSI LUN Disk: Connection details should be mandatory
Keywords:
Status: CLOSED CURRENTRELEASE
Alias: None
Product: Red Hat Enterprise Virtualization Manager
Classification: Red Hat
Component: ovirt-engine-restapi
Version: 3.1.0
Hardware: Unspecified
OS: Unspecified
unspecified
unspecified
Target Milestone: ---
: 3.2.0
Assignee: Ori Liel
QA Contact: Jakub Libosvar
URL:
Whiteboard: storage
Depends On: 869596
Blocks: 886520 915537
TreeView+ depends on / blocked
 
Reported: 2012-10-10 08:53 UTC by Ori Liel
Modified: 2016-02-10 19:40 UTC (History)
11 users (show)

Fixed In Version: sf3
Doc Type: Bug Fix
Doc Text:
Clone Of:
: 886520 (view as bug list)
Environment:
Last Closed:
oVirt Team: Storage
Target Upstream Version:
Embargoed:


Attachments (Terms of Use)

Description Ori Liel 2012-10-10 08:53:10 UTC
When an ISCSI lun disk is created, as far as Backend is concerned sometimes connection-details are necessary, and sometimes they are not (specifically when the lun is already saved in the database). 

Since we don't want the user to have a  confusing experience - sometimes disk creation succeeds with ID only, but sometimes connection details are necessary (and user has no way of knowing when) - we will validate in API layer that the connection details are *always* provided for ISCSI LUN disk creation.

Comment 1 Itamar Heim 2012-10-10 09:51:39 UTC
what if it is an FC LUN?

Comment 2 Ayal Baron 2012-10-10 10:02:23 UTC
(In reply to comment #1)
> what if it is an FC LUN?

no connection required for FC, but that is why the comment above states 'iscsi'.

Comment 5 Ori Liel 2012-10-22 17:03:16 UTC
patch posted upstream: 
   http://gerrit.ovirt.org/#/c/8721/

patch merged upstream: 
   4d55d702c735bb98b4a602fddb76aac00a125d6b

patch posted downstream: 
   https://gerrit.eng.lab.tlv.redhat.com/#/c/2798/

patch merged downstream: 
   80eef9190258c76cc0168887149ccb21b2bebbd7

Comment 6 Jakub Libosvar 2012-11-02 09:08:08 UTC
Verified rhevm-3.1.0-25.el6ev.noarch

Comment 7 Jakub Libosvar 2012-11-02 09:41:30 UTC
Moving back to assigned, lun_id check is missing then we get oVirt internal error due to DB constraints:
<disk>
    <alias>direct_lun</alias>
    <interface>virtio</interface>
    <format>cow</format>
    <lunStorage>
        <type>iscsi</type>
        <logical_unit>
            <address>10.34.63.200</address>
            <port>3260</port>
            <target>iqn.1992-05.com.emc:ckm001201002300000-5-vnxe</target>
        </logical_unit>
    </lunStorage>
</disk>

2012-11-02 10:13:15,366 ERROR [org.ovirt.engine.core.bll.AddDiskCommand] (ajp-/127.0.0.1:8702-3) [1e270ce7] Command org.ovirt.engine.core.bll.AddDiskCommand throw exception: org.springframework.dao.DataIntegrityViolationException: CallableStatementCallback; SQL [{call insertluns(?, ?, ?, ?, ?, ?, ?, ?)}]; ERROR: null value in column "lun_id" violates not-null constraint
  Where: SQL statement "INSERT INTO LUNs(LUN_id, physical_volume_id, volume_group_id, serial, lun_mapping, vendor_id, product_id, device_size) VALUES( $1 ,  $2 ,  $3 ,  $4 ,  $5 ,  $6 ,  $7 ,  $8 )"
PL/pgSQL function "insertluns" line 2 at SQL statement; nested exception is org.postgresql.util.PSQLException: ERROR: null value in column "lun_id" violates not-null constraint

For missing target and/or address, proper error message is returned.

But when missing the whole lunStorage section, the error message is wrong:
Disk [provisionedSize|size] required for validateDiskForCreation

Comment 8 Michael Pasternak 2012-11-03 14:11:00 UTC
http://gerrit.ovirt.org/#/c/8997/

Comment 9 Allon Mureinik 2012-12-12 10:29:22 UTC
both patches are merged upstream.

Comment 11 Jakub Libosvar 2013-01-14 14:41:47 UTC
Works in rhevm-3.2.0-4.el6ev.noarch but <type> is not required - I will clone bug 863101 to 3.2

Comment 12 Itamar Heim 2013-06-11 09:31:58 UTC
3.2 has been released

Comment 13 Itamar Heim 2013-06-11 09:33:02 UTC
3.2 has been released

Comment 14 Itamar Heim 2013-06-11 09:48:51 UTC
3.2 has been released


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