Bug 1577191 - reporteddevices by VM's NIC doesn't return anything
Summary: reporteddevices by VM's NIC doesn't return anything
Keywords:
Status: CLOSED CURRENTRELEASE
Alias: None
Product: ovirt-engine
Classification: oVirt
Component: RestAPI
Version: 4.2.3.5
Hardware: Unspecified
OS: Unspecified
unspecified
medium vote
Target Milestone: ovirt-4.2.5
: ---
Assignee: Ori Liel
QA Contact: Radim Hrazdil
URL:
Whiteboard:
Depends On:
Blocks:
TreeView+ depends on / blocked
 
Reported: 2018-05-11 12:30 UTC by Lucie Leistnerova
Modified: 2018-07-31 15:26 UTC (History)
3 users (show)

Fixed In Version:
Doc Type: If docs needed, set a value
Doc Text:
Clone Of:
Environment:
Last Closed: 2018-07-31 15:26:33 UTC
oVirt Team: Infra
rule-engine: ovirt-4.2+


Attachments (Terms of Use)


Links
System ID Priority Status Summary Last Updated
oVirt gerrit 91780 master MERGED restapi: Empty Reported Devices under Nic 2018-06-01 12:16:23 UTC
oVirt gerrit 91863 ovirt-engine-4.2 MERGED restapi: Empty Reported Devices under Nic 2018-06-04 14:07:55 UTC

Description Lucie Leistnerova 2018-05-11 12:30:31 UTC
Description of problem:
Getting link href for reporteddevices by VM's NIC doesn't return anything even when it should.

Version-Release number of selected component (if applicable):
ovirt-engine-restapi-4.2.3.5-0.1.el7.noarch

How reproducible: always


Steps to Reproduce:
1. create new VM with default parameters in engine
2. install OS and guest agent on the VM
3. in webadmin you can see some info in VM detail -> Network interfaces -> nic1 -> Guest Agent Data
3. get nic1 id for that VM, e.g. from
curl -k -u admin@internal:xxx -H "Prefer: persistent-auth" https://engine/ovirt-engine/api/vms/<vm_id>/nics
3. get reported devices from links by that NIC, e.g.
curl -k -u admin@internal:xxx -H "Prefer: persistent-auth" https://engine/ovirt-engine/api/vms/<vm_id>/nics/<nic_id>/reporteddevices

Actual results: no devices
    <reported_devices/>


Expected results: some device e.g.
    <reported_devices>
        <reported_device href="/ovirt-engine/api/vms/735917b1-e057-4265-bdc5-c8cb98eb1930/reporteddevices/65746830-3030-3a31-613a-34343a30383a" id="65746830-3030-3a31-613a-34343a30383a">
            <name>eth0</name>
            <description>guest reported data</description>
            <ips>
                <ip>
                    <address>...</address>
                    <version>v4</version>
                </ip>
                <ip>
                    <address>...</address>
                    <version>v6</version>
                </ip>
            </ips>
            <mac>
                <address>...</address>
            </mac>
            <type>network</type>
        </reported_device>
    </reported_devices>

or the link should be removed, because reported_devices is printed already by the NIC

Comment 1 Ori Liel 2018-05-30 08:15:15 UTC
The bug does not reproduce for me. 

I've reproduced the scenario: created a VM, installed an OS on it, installed and ran the guest-agent, then queried for the VM's nic, and inside it followed the link to the reported-devices. 

The result of the query contained the expected 'guest reported data'.

I've closed the bug, please re-open if necessary with more precise steps to reproduce

Comment 2 Lucie Leistnerova 2018-05-30 09:02:34 UTC
There are two links to reported devices by the vnic

<name>nic1</name>
...
<link href="/ovirt-engine/api/vms/ee8fd101-7bf7-4f8f-a8b5-774c78f039ce/nics/0e3f7916-b2b2-42c5-90ad-32907cdc1292/reporteddevices" rel="reporteddevices"/>
...
<reported_devices>
<reported_device href="/ovirt-engine/api/vms/ee8fd101-7bf7-4f8f-a8b5-774c78f039ce/reporteddevices/65746830-3030-3a31-613a-34613a31363a" id="65746830-3030-3a31-613a-34613a31363a">

and the first one (that goes to nics->devices) doesn't show anything. 
Second that goes to exact device with vms->devices works fine.

Comment 3 Radim Hrazdil 2018-07-09 11:20:19 UTC
Verified that query for reporteddevices returns following structure:

<?xml version="1.0" encoding="UTF-8" standalone="yes"?>
<reported_devices>
    <reported_device href="/ovirt-engine/api/vms/<vm_id>/reporteddevices/<nic_id>" id="<nic_id>">
        <name>eth0</name>
        <description>guest reported data</description>
        <ips>
            <ip>
                <address><ip></address>
                <version>v4</version>
            </ip>

        </ips>
        <mac>
            <address><mac_addr></address>
        </mac>
        <type>network</type>
        <vm href="/ovirt-engine/api/vms/<vm_id>" id="<vm_id>"/>
    </reported_device>
</reported_devices>


Software Version:4.2.5-0.1.el7ev

Comment 4 Sandro Bonazzola 2018-07-31 15:26:33 UTC
This bugzilla is included in oVirt 4.2.5 release, published on July 30th 2018.

Since the problem described in this bug report should be
resolved in oVirt 4.2.5 release, it has been closed with a resolution of CURRENT RELEASE.

If the solution does not work for you, please open a new bug report.


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