Bug 864840 - Create ISCSI LUN Disk: Connection details should be mandatory
Create ISCSI LUN Disk: Connection details should be mandatory
Product: Red Hat Enterprise Virtualization Manager
Classification: Red Hat
Component: ovirt-engine-restapi (Show other bugs)
Unspecified Unspecified
unspecified Severity unspecified
: ---
: 3.2.0
Assigned To: Ori Liel
Jakub Libosvar
: ZStream
Depends On: 869596
Blocks: 886520 915537
  Show dependency treegraph
Reported: 2012-10-10 04:53 EDT by Ori Liel
Modified: 2016-02-10 14:40 EST (History)
11 users (show)

See Also:
Fixed In Version: sf3
Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of:
: 886520 (view as bug list)
Last Closed:
Type: Bug
Regression: ---
Mount Type: ---
Documentation: ---
Verified Versions:
Category: ---
oVirt Team: Storage
RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: ---

Attachments (Terms of Use)

  None (edit)
Description Ori Liel 2012-10-10 04:53:10 EDT
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 05:51:39 EDT
what if it is an FC LUN?
Comment 2 Ayal Baron 2012-10-10 06:02:23 EDT
(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 13:03:16 EDT
patch posted upstream: 

patch merged upstream: 

patch posted downstream: 

patch merged downstream: 
Comment 6 Jakub Libosvar 2012-11-02 05:08:08 EDT
Verified rhevm-3.1.0-25.el6ev.noarch
Comment 7 Jakub Libosvar 2012-11-02 05:41:30 EDT
Moving back to assigned, lun_id check is missing then we get oVirt internal error due to DB constraints:

2012-11-02 10:13:15,366 ERROR [org.ovirt.engine.core.bll.AddDiskCommand] (ajp-/ [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 10:11:00 EDT
Comment 9 Allon Mureinik 2012-12-12 05:29:22 EST
both patches are merged upstream.
Comment 11 Jakub Libosvar 2013-01-14 09:41:47 EST
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 05:31:58 EDT
3.2 has been released
Comment 13 Itamar Heim 2013-06-11 05:33:02 EDT
3.2 has been released
Comment 14 Itamar Heim 2013-06-11 05:48:51 EDT
3.2 has been released

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