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

Bug 1631288

Summary: [REST-API] [RHEL7.6 hypervisor] GET diskattachments for a vm is missing a logical_name
Product: [oVirt] ovirt-engine Reporter: Elad <ebenahar>
Component: RestAPIAssignee: Tal Nisan <tnisan>
Status: CLOSED WORKSFORME QA Contact: Elad <ebenahar>
Severity: medium Docs Contact:
Priority: unspecified    
Version: 4.2.6.2CC: bugs, ebenahar, ratamir, rbarry
Target Milestone: ---Keywords: Automation, AutomationBlocker, Regression
Target Release: ---   
Hardware: x86_64   
OS: Unspecified   
Whiteboard:
Fixed In Version: Doc Type: If docs needed, set a value
Doc Text:
Story Points: ---
Clone Of: Environment:
Last Closed: 2019-02-03 14:15:30 UTC Type: Bug
Regression: --- Mount Type: ---
Documentation: --- CRM:
Verified Versions: Category: ---
oVirt Team: Virt RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: --- Target Upstream Version:
Embargoed:
Attachments:
Description Flags
logs none

Description Elad 2018-09-20 10:46:18 UTC
Created attachment 1485095 [details]
logs

Description of problem:
With a RHEL7.6 hypervisor, GET response for diskattachments doesn't list <logical_name>.

For comparison, with RHEL7.5 hypervisor, diskattachments does list <logical_name>.


Not sure if it's a RHV bug or a platform one.


Version-Release number of selected component (if applicable):
ovirt-engine-4.2.6.4-0.1.el7ev.noarch
vdsm-4.20.39.1-1.el7ev.x86_64
libvirt-4.5.0-9.el7.x86_64
qemu-img-rhev-2.12.0-13.el7.x86_64
Red Hat Enterprise Linux Server 7.6 Beta (Maipo)
kernel_release	3.10.0-945.el7.x86_64


How reproducible:
Always with RHEL7.6 hypervisor

Steps to Reproduce:
1. Create a VM with disk 
2. GET diskattachments for the VM:


GET request content is --  url:/ovirt-engine/api/vms/e2b10ec6-c987-4aa7-8414-6376f3a206c0/diskattachments



Actual results:

<logical_name> is missing for the VM disks:


<disk_attachments>
    <disk_attachment href="/ovirt-engine/api/vms/e2b10ec6-c987-4aa7-8414-6376f3a206c0/diskattachments/58d8aff7-0a4d-4081-85e8-31b3c0246c53" id="58d8aff7-0a4d-4081-85e8-31b3c0246c53">
        <active>true</active>
        <bootable>true</bootable>
        <interface>virtio</interface>
        <pass_discard>false</pass_discard>
        <read_only>false</read_only>
        <uses_scsi_reservation>false</uses_scsi_reservation>
        <disk href="/ovirt-engine/api/disks/58d8aff7-0a4d-4081-85e8-31b3c0246c53" id="58d8aff7-0a4d-4081-85e8-31b3c0246c53"/>
        <vm href="/ovirt-engine/api/vms/e2b10ec6-c987-4aa7-8414-6376f3a206c0" id="e2b10ec6-c987-4aa7-8414-6376f3a206c0"/>
    </disk_attachment>
    <disk_attachment href="/ovirt-engine/api/vms/e2b10ec6-c987-4aa7-8414-6376f3a206c0/diskattachments/14086423-70af-4b5c-a520-cd6067b91c26" id="14086423-70af-4b5c-a520-cd6067b91c26">
        <active>true</active>
        <bootable>false</bootable>
        <interface>virtio</interface>
        <pass_discard>false</pass_discard>
        <read_only>false</read_only>
        <uses_scsi_reservation>false</uses_scsi_reservation>
        <disk href="/ovirt-engine/api/disks/14086423-70af-4b5c-a520-cd6067b91c26" id="14086423-70af-4b5c-a520-cd6067b91c26"/>
        <vm href="/ovirt-engine/api/vms/e2b10ec6-c987-4aa7-8414-6376f3a206c0" id="e2b10ec6-c987-4aa7-8414-6376f3a206c0"/>
    </disk_attachment>
</disk_attachments>



Expected results:
<logical_name> should be returned 

Additional info:

For comparison, with RHEL7.5, the same GET request returns <logical_name>:

GET request content is --  url:/ovirt-engine/api/vms/b6034d3f-0e74-4d7a-9f03-48f03c511764/diskattachments

Response body for GET request is:
<disk_attachments>
    <disk_attachment href="/ovirt-engine/api/vms/b6034d3f-0e74-4d7a-9f03-48f03c511764/diskattachments/f66cd0c5-fc2e-4584-b9f8-76f9527c02a2" id="f66cd0c5-fc2e-4584-b9f8-76f9527c02a2">
        <active>true</active>
        <bootable>true</bootable>
        <interface>virtio</interface>
        <logical_name>/dev/vda</logical_name>
        <pass_discard>false</pass_discard>
        <read_only>false</read_only>
        <uses_scsi_reservation>false</uses_scsi_reservation>
        <disk href="/ovirt-engine/api/disks/f66cd0c5-fc2e-4584-b9f8-76f9527c02a2" id="f66cd0c5-fc2e-4584-b9f8-76f9527c02a2"/>
        <vm href="/ovirt-engine/api/vms/b6034d3f-0e74-4d7a-9f03-48f03c511764" id="b6034d3f-0e74-4d7a-9f03-48f03c511764"/>
    </disk_attachment>
    <disk_attachment href="/ovirt-engine/api/vms/b6034d3f-0e74-4d7a-9f03-48f03c511764/diskattachments/ae6c3911-635b-4336-a6be-ada6e569dde6" id="ae6c3911-635b-4336-a6be-ada6e569dde6">
        <active>true</active>
        <bootable>false</bootable>
        <interface>virtio</interface>
        <logical_name>/dev/vdb</logical_name>
        <pass_discard>false</pass_discard>
        <read_only>false</read_only>
        <uses_scsi_reservation>false</uses_scsi_reservation>
        <disk href="/ovirt-engine/api/disks/ae6c3911-635b-4336-a6be-ada6e569dde6" id="ae6c3911-635b-4336-a6be-ada6e569dde6"/>
        <vm href="/ovirt-engine/api/vms/b6034d3f-0e74-4d7a-9f03-48f03c511764" id="b6034d3f-0e74-4d7a-9f03-48f03c511764"/>
    </disk_attachment>
</disk_attachments>


Attached logs for both RHEL7.5 and RHEL7.6

Comment 1 Tal Nisan 2018-10-07 14:01:48 UTC
Michal, the fact that it is related to the RHEL version means it probably relates to the guest agent somehow, moving to Virt due to that

Comment 2 Ryan Barry 2018-10-08 12:40:17 UTC
This looks like a potential side effect of rhbz#1634765

Comment 3 Ryan Barry 2018-11-06 22:18:05 UTC
Can you please retest now that the guest agent works as expected?

Comment 4 Elad 2018-11-07 09:56:40 UTC
I'll have the answer when bug 1634765 will be ON_QA and we'll start using this version in our automation.

Comment 5 Ryan Barry 2019-01-24 00:11:11 UTC
Elad, any update?

Comment 6 Elad 2019-02-03 12:29:01 UTC
Yes, sorry for the late response.


logical_name is returned:

2019-02-02 06:15:48,872 - MainThread - diskattachments - DEBUG - GET request content is --  url:/ovirt-engine/api/vms/ba3ccd62-a83f-4da0-b7e2-bea5c7a3429c/diskattachments 
2019-02-02 06:15:48,896 - MainThread - diskattachments - DEBUG - Response code is valid: [200, 201] 
2019-02-02 06:15:48,896 - MainThread - diskattachments - DEBUG - Response body for GET request is: 
<disk_attachments>
    <disk_attachment href="/ovirt-engine/api/vms/ba3ccd62-a83f-4da0-b7e2-bea5c7a3429c/diskattachments/d1dd6174-8c4d-4bfa-9995-017dcb684ed7" id="d1dd6174-8c4d-4bfa-9995-017dcb684ed7">
        <active>true</active>
        <bootable>true</bootable>
        <interface>virtio</interface>
        <logical_name>/dev/vda</logical_name>


vdsm-4.20.46-1.el7ev.x86_64
libvirt-4.5.0-10.el7_6.4.x86_64
qemu-img-rhev-2.12.0-18.el7_6.3.x86_64
kernel - 3.10.0-957.5.1.el7.x86_64

Comment 7 Elad 2019-02-03 12:33:17 UTC
And:
ovirt-engine-4.2.8.3-0.1.el7ev.noarch