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.
what if it is an FC LUN?
(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'.
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
Verified rhevm-3.1.0-25.el6ev.noarch
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
http://gerrit.ovirt.org/#/c/8997/
both patches are merged upstream.
Works in rhevm-3.2.0-4.el6ev.noarch but <type> is not required - I will clone bug 863101 to 3.2
3.2 has been released