Bug 1358271

Summary: [v4 API only]: <logical_name> property (device name for disk) missing from disk attachments v4
Product: [oVirt] ovirt-engine Reporter: Carlos Mestre González <cmestreg>
Component: RestAPIAssignee: Idan Shaby <ishaby>
Status: CLOSED CURRENTRELEASE QA Contact: Raz Tamir <ratamir>
Severity: high Docs Contact:
Priority: unspecified    
Version: 4.0.1.1CC: acanan, amureini, bugs, cmestreg, gklein, ishaby, sbonazzo, ylavi
Target Milestone: ovirt-4.0.4Keywords: AutomationBlocker, Regression
Target Release: 4.0.4Flags: rule-engine: ovirt-4.0.z+
ylavi: blocker-
rule-engine: planning_ack+
amureini: devel_ack+
acanan: testing_ack+
Hardware: Unspecified   
OS: Unspecified   
Whiteboard:
Fixed In Version: Doc Type: If docs needed, set a value
Doc Text:
Story Points: ---
Clone Of: Environment:
Last Closed: 2016-09-26 12:34:49 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:

Description Carlos Mestre González 2016-07-20 12:10:21 UTC
Description of problem:
Cannot get the device name for a disk in a vm. Before it was in /vms/{vm:id}/disks/{disk:id} under <logical_name>, now that disks is missing is not under /vms/{vm:id}/diskattachments/{disk:id}


Version-Release number of selected component (if applicable):
rhevm-4.0.1.1-0.1.el7ev.noarch

How reproducible:
100%

Steps to Reproduce:
1. Create a vm with OS and rhevm-guest-agent
2. Try to get the logical name for the disk with GET /vms/{vm:id}/diskattachments/{disk:id}

Actual results:
no logical_name

Expected results:
Should return the logical_name property with the device name for that disk for that vm.

Additional info:
The logical name still works in v3 in the same system, GET /vms/{vm:id}/disks/{disk:id} returns the <logical_name> successfully.

I'm setting the severity high since this is blocking quite a few of our tests.

Comment 1 Red Hat Bugzilla Rules Engine 2016-07-20 13:07:25 UTC
This bug report has Keywords: Regression or TestBlocker.
Since no regressions or test blockers are allowed between releases, it is also being identified as a blocker for this release. Please resolve ASAP.

Comment 2 Tal Nisan 2016-07-20 13:38:56 UTC
Strange, haven't touched this field at all, it might be from the move to V4, will look into it

Comment 3 Allon Mureinik 2016-07-25 11:17:37 UTC
Idan, this has become important, and Tal is on PTO. Can you take a look at this please?

Comment 4 Idan Shaby 2016-07-26 08:54:40 UTC
I can't see any information regarding the logical_name on the v3 api.
The only thing that I see additionally to the info I got before installing ovirt-guest-agent is:

<guest_info>
  <ips>
    <ip address="..." version="v4"/>
    <ip address="..." version="v6"/>
    <ip address="..." version="v6"/>
  </ips>
</guest_info>

inside the <vm> property under:
/ovirt-engine/api/v3/vms/<vm_id>/disks/<disk_id>

Do I need to do anything else to get that disk's logical name?
Also, which OS did you install on the vm?

Comment 5 Carlos Mestre González 2016-07-26 09:48:18 UTC
It should work just with the guest agent installed, from v3:

<disks>
     [...]
        <name>golden_mixed_virtio_template</name>
        <description>golden_env_mixed_virtio_0_Disk1 (39a611d)</description>
    [...]
            <guest_info>
                <ips>
                    <ip address="10.35.81.234" version="v4"/>
                    <ip address="fe80::21a:4aff:fe16:81ea" version="v6"/>
                </ips>
            </guest_info>
        </vm>
        [...]
        <disk_profile href="/ovirt-engine/api/diskprofiles/baea7b49-d346-46e9-ab9a-b927f3fd497b" id="baea7b49-d346-46e9-ab9a-b927f3fd497b"/> <logical_name>/dev/vda</logical_name>
        <storage_type>image</storage_type>
    </disk>
</disks>

guest os: RHEL 6.8
rhevm-guest-agent-1.0.11-6

Comment 7 Raz Tamir 2016-09-01 14:21:58 UTC
verified on ovirt-engine-4.0.4-0.1.el7ev.noarch

<disk_attachments>
<disk_attachment href="/ovirt-engine/api/vms/7c3312d0-f4bf-4c55-af82-e0b3c6d77598/diskattachments/f09976fc-712b-44fe-b14d-252f3e22d21f" id="f09976fc-712b-44fe-b14d-252f3e22d21f">
<active>true</active>
<bootable>false</bootable>
<interface>virtio</interface>

<logical_name>/dev/vda</logical_name>  <---    ***VERIFIED***

<disk href="/ovirt-engine/api/disks/f09976fc-712b-44fe-b14d-252f3e22d21f" id="f09976fc-712b-44fe-b14d-252f3e22d21f"/>
<vm href="/ovirt-engine/api/vms/7c3312d0-f4bf-4c55-af82-e0b3c6d77598" id="7c3312d0-f4bf-4c55-af82-e0b3c6d77598"/>
</disk_attachment>
</disk_attachments>