Bugzilla will be upgraded to version 5.0. The upgrade date is tentatively scheduled for 2 December 2018, pending final testing and feedback.
Bug 1123754 - Direct FC lun disk details aren't validated
Direct FC lun disk details aren't validated
Status: CLOSED ERRATA
Product: Red Hat Enterprise Virtualization Manager
Classification: Red Hat
Component: ovirt-engine (Show other bugs)
3.4.0
x86_64 Linux
high Severity high
: ---
: 3.5.0
Assigned To: Daniel Erez
Elad
storage
:
Depends On: 1096217
Blocks: rhev3.5beta 1156165
  Show dependency treegraph
 
Reported: 2014-07-28 04:00 EDT by Udayendu Sekhar Kar
Modified: 2016-02-10 11:48 EST (History)
17 users (show)

See Also:
Fixed In Version: vt2.2
Doc Type: Enhancement
Doc Text:
Upon creating a new DirectLUN disk, the LUN visibility on a host is now validated. If the specified LUN isn't visible to the host, the action would be aborted and a proper error message returned. Note that the validation is only executed if a host is specified by the user; otherwise, no validation is performed.
Story Points: ---
Clone Of: 1096217
Environment:
Last Closed: 2015-02-11 13:06:53 EST
Type: Bug
Regression: ---
Mount Type: ---
Documentation: ---
CRM:
Verified Versions:
Category: ---
oVirt Team: Storage
RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: ---
amureini: needinfo+


Attachments (Terms of Use)


External Trackers
Tracker ID Priority Status Summary Last Updated
oVirt gerrit 31676 master MERGED core,restapi: DirectLUN disk - validate LUN visibilty Never
oVirt gerrit 31924 ovirt-engine-3.5 MERGED core,restapi: DirectLUN disk - validate LUN visibilty Never
Red Hat Product Errata RHSA-2015:0158 normal SHIPPED_LIVE Important: Red Hat Enterprise Virtualization Manager 3.5.0 2015-02-11 17:38:50 EST

  None (edit)
Description Udayendu Sekhar Kar 2014-07-28 04:00:21 EDT
+++ 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:

#!/usr/bin/python

import ovirtsdk.api
import ovirtsdk.xml.params

api = ovirtsdk.api.API(
    url="https://rhel.example.com/ovirt-engine/api",
    username="admin@internal",
    password="******",
    insecure=True,
    debug=True)

# Create the iSCSI storage connection:
sc = ovirtsdk.xml.params.StorageConnection()
sc.set_address("192.168.122.1")
sc.set_type("iscsi")
sc.set_port(3260)
sc.set_target("iqn.2014-01.com.example:iscsi")
sc = api.storageconnections.add(sc)

# Add the direct LUN disk:
lu = ovirtsdk.xml.params.LogicalUnit()
lu.set_id("something_that_doesnt_exist")
lu.set_address(sc.get_address())
lu.set_port(sc.get_port())
lu.set_target(sc.get_target())
storage = ovirtsdk.xml.params.Storage()
storage.set_type("iscsi")
storage.set_logical_unit([lu])
disk = ovirtsdk.xml.params.Disk()
disk.set_name("mylun")
disk.set_interface("virtio")
disk.set_type("iscsi")
disk.set_format("raw")
disk.set_lun_storage(storage)
disk = api.disks.add(disk)

api.disconnect()

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.
Comment 1 Allon Mureinik 2014-07-28 07:38:46 EDT
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?
Comment 2 Udayendu Sekhar Kar 2014-07-28 09:37:32 EDT
Yes Allon,

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.

Thanks,
Uday
Comment 3 Udayendu Sekhar Kar 2014-08-04 23:07:58 EDT
Allon,

One more point I would like to add here:

- Customer is using the FC lun.

Thanks,
Uday
Comment 5 Elad 2014-09-15 07:44:42 EDT
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:
<fault>
<reason>Operation Failed</reason>
<detail>Entity not found: null</detail>
</fault>


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
Comment 6 Tal Nisan 2014-11-26 06:32:49 EST
Please supply doc text
Comment 8 errata-xmlrpc 2015-02-11 13:06:53 EST
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.

https://rhn.redhat.com/errata/RHSA-2015-0158.html

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