Note: This bug is displayed in read-only format because the product is no longer active in Red Hat Bugzilla.

Bug 1065014

Summary: Adding a direct LUN disk doesn't work
Product: [Retired] oVirt Reporter: Juan Hernández <juan.hernandez>
Component: ovirt-engine-apiAssignee: Daniel Erez <derez>
Status: CLOSED CURRENTRELEASE QA Contact: Raz Tamir <ratamir>
Severity: unspecified Docs Contact:
Priority: high    
Version: 3.3CC: acathrow, amureini, bazulay, gklein, iheim, pablo.iranzo, pmukhedk, yeylon
Target Milestone: ---   
Target Release: 3.4.0   
Hardware: Unspecified   
OS: Unspecified   
Whiteboard: storage
Fixed In Version: ovirt-3.4.0-rc Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of: Environment:
Last Closed: 2014-03-31 12:26:46 UTC Type: Bug
Regression: --- Mount Type: ---
Documentation: --- CRM:
Verified Versions: Category: ---
oVirt Team: Storage RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: --- Target Upstream Version:
Embargoed:
Attachments:
Description Flags
Relevant messages from engine.log none

Description Juan Hernández 2014-02-13 17:24:04 UTC
Adding a direct LUN disk doesn't work correctly. For example, the following coomand:

# curl \
-k \
-X POST \
-H "Accept: application/xml" \
-H "Content-Type: application/xml" \
-d "
<disk>
  <format>raw</format>
  <interface>virtio</interface>
  <lun_storage>
    <type>fcp</type>
    <logical_unit id='0QEMU_QEMU_HARDDISK_drive-scsi0-0-0'/>
  </lun_storage>
</disk>
" \
-u admin@internal:redhat123 \
https://rhel.example.com/api/disks

Generates the following output:

<?xml version="1.0" encoding="UTF-8" standalone="yes"?>
<fault>
    <reason>Operation Failed</reason>
    <detail>[Internal Engine Error]</detail>
</fault>

Comment 1 Juan Hernández 2014-02-13 17:25:04 UTC
Created attachment 862917 [details]
Relevant messages from engine.log

Comment 2 Allon Mureinik 2014-02-16 15:40:41 UTC
Daniel, please take a look. Not sure the syntax is right, though - we seem to be missing connection details there.

Comment 3 Ayal Baron 2014-02-17 21:29:36 UTC
(In reply to Allon Mureinik from comment #2)
> Daniel, please take a look. Not sure the syntax is right, though - we seem
> to be missing connection details there.

<type>fcp</type> shouldn't require connection details...

Comment 4 Juan Hernández 2014-02-19 18:30:28 UTC
When verifying, if possible, please check that this works also using the command line:

  [oVirt shell (connected)]# add disk --format raw --interface virtio --lun_storage-type fcp --lun_storage-logical_unit "logical_unit.id=0QEMU_QEMU_HARDDISK_drive-scsi0-0-1" --alias mylun

Comment 5 Daniel Erez 2014-02-19 18:51:31 UTC
(In reply to Juan Hernández from comment #4)
> When verifying, if possible, please check that this works also using the
> command line:
> 
>   [oVirt shell (connected)]# add disk --format raw --interface virtio
> --lun_storage-type fcp --lun_storage-logical_unit
> "logical_unit.id=0QEMU_QEMU_HARDDISK_drive-scsi0-0-1" --alias mylun

Sure, verified with the suggested command - works as expected.

Comment 6 Sandro Bonazzola 2014-03-03 14:40:18 UTC
This BZ should be fixed in oVirt 3.4.0 RC

Comment 7 Raz Tamir 2014-03-06 09:52:58 UTC
Verified - 
POST:
<disk>
 <alias>mylun</alias>
 <format>raw</format>
 <interface>virtio</interface>
  <lun_storage>
    <type>fcp</type>
    <logical_unit id="360060160f4a030009e73bb88a37be31"/>
  </lun_storage>
</disk>

To http://10.35.161.52/api/vms/cc5999e3-66a7-4dad-ab09-76ffb5f7b901/disks
vie RESTAPI.

Comment 8 Sandro Bonazzola 2014-03-31 12:26:46 UTC
this is an automated message: moving to Closed CURRENT RELEASE since oVirt 3.4.0 has been released