+++ This bug was initially created as a clone of Bug #1096217 +++
When adding a direct iSCSI direct LUN disk using the RESTAPI without creating a storage domain, the details given by the user aren't validated, and stored in the database regardless of their correctness. In particular the LUN id isn't validated, just stored in the database. Other attributes, like the vendor id, the model id, the serial number and the size aren't retrieved from the iSCSI server and left empty in the database.
This can be reproduced with a Python script like this:
api = ovirtsdk.api.API(
# Create the iSCSI storage connection:
sc = ovirtsdk.xml.params.StorageConnection()
sc = api.storageconnections.add(sc)
# Add the direct LUN disk:
lu = ovirtsdk.xml.params.LogicalUnit()
storage = ovirtsdk.xml.params.Storage()
disk = ovirtsdk.xml.params.Disk()
disk = api.disks.add(disk)
This succeeds, and the LUN disk is created, but will never work. The expected result is that incorrect LUN ids are detected, and that the additional attributes are populated correctly.
Udayendu, as far as I can see this is just a clone to track the same issue as Bug #1096217 for RHEV (as opposed to oVirt).
Am I missing anything?
This is just a clone some that I can map it to the service request opened by customer for RHEV as we can't map the upstream BZ to the ticket.
But customer is having this issue, so we need some quick fix.
One more point I would like to add here:
- Customer is using the FC lun.
When trying to add a FC direct LUN via REST with wrong parameters, the LUN is not added to the DB and the operation fails with:
<detail>Entity not found: null</detail>
note that in order to validate the existence of the LUN with the right parameters, need to pass the host in the XML request.
Verified using rhev 3.5 vt3.1
Please supply doc text
Since the problem described in this bug report should be
resolved in a recent advisory, it has been closed with a
resolution of ERRATA.
For information on the advisory, and where to find the updated
files, follow the link below.
If the solution does not work for you, open a new bug report.