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.
Daniel, where's the patch that moved this BZ to POST? thanks.
(In reply to Allon Mureinik from comment #1) > Daniel, where's the patch that moved this BZ to POST? thanks. Added.