Description of problem: Request to get template nics after a nic is added to the template gets wrong nic href in the response occasionally. 2021-02-22 02:30:47,623 - MainThread - nics - DEBUG - CREATE request content is -- url:/ovirt-engine/api/templates/6e969eca-b3d7-4b10-9022-34542d483415/nics body:<nic> <name>template_nic</name> <vnic_profile href="/ovirt-engine/api/vnicprofiles/ef311433-8459-42b3-b65e-6ae01e77201c" id="ef311433-8459-42b3-b65e-6ae01e77201c"> <name>ovirtmgmt</name> <link href="/ovirt-engine/api/vnicprofiles/ef311433-8459-42b3-b65e-6ae01e77201c/permissions" rel="permissions"/> <pass_through> <mode>disabled</mode> </pass_through> <port_mirroring>false</port_mirroring> <network href="/ovirt-engine/api/networks/4e2ef15d-07ae-4894-acec-4a5426bf2028" id="4e2ef15d-07ae-4894-acec-4a5426bf2028"/> <network_filter href="/ovirt-engine/api/networkfilters/d2370ab4-fee3-11e9-a310-8c1645ce738e" id="d2370ab4-fee3-11e9-a310-8c1645ce738e"/> </vnic_profile> </nic> 2021-02-22 02:30:47,723 - MainThread - nics - DEBUG - Response body for CREATE request is: <nic href="/ovirt-engine/api/templates/6e969eca-b3d7-4b10-9022-34542d483415/nics/da832111-c541-468d-927c-ac03335216da" id="da832111-c541-468d-927c-ac03335216da"> <actions> <link href="/ovirt-engine/api/templates/6e969eca-b3d7-4b10-9022-34542d483415/nics/da832111-c541-468d-927c-ac03335216da/activate" rel="activate"/> <link href="/ovirt-engine/api/templates/6e969eca-b3d7-4b10-9022-34542d483415/nics/da832111-c541-468d-927c-ac03335216da/deactivate" rel="deactivate"/> </actions> <name>template_nic</name> <template href="/ovirt-engine/api/templates/6e969eca-b3d7-4b10-9022-34542d483415" id="6e969eca-b3d7-4b10-9022-34542d483415"/> <vm href="/ovirt-engine/api/vms/6e969eca-b3d7-4b10-9022-34542d483415" id="6e969eca-b3d7-4b10-9022-34542d483415"/> <interface>virtio</interface> <linked>true</linked> <plugged>true</plugged> <vnic_profile href="/ovirt-engine/api/vnicprofiles/ef311433-8459-42b3-b65e-6ae01e77201c" id="ef311433-8459-42b3-b65e-6ae01e77201c"/> </nic> 2021-02-22 02:30:47,803 - MainThread - templates - DEBUG - GET request content is -- url:/ovirt-engine/api/templates/6e969eca-b3d7-4b10-9022-34542d483415/nics 2021-02-22 02:30:47,823 - MainThread - templates - DEBUG - Response body for GET request is: <nics> <nic href="/ovirt-engine/api/vms/6e969eca-b3d7-4b10-9022-34542d483415/nics/da832111-c541-468d-927c-ac03335216da" id="da832111-c541-468d-927c-ac03335216da"> <actions> <link href="/ovirt-engine/api/vms/6e969eca-b3d7-4b10-9022-34542d483415/nics/da832111-c541-468d-927c-ac03335216da/activate" rel="activate"/> <link href="/ovirt-engine/api/vms/6e969eca-b3d7-4b10-9022-34542d483415/nics/da832111-c541-468d-927c-ac03335216da/deactivate" rel="deactivate"/> </actions> <name>template_nic</name> <template href="/ovirt-engine/api/templates/6e969eca-b3d7-4b10-9022-34542d483415" id="6e969eca-b3d7-4b10-9022-34542d483415"/> <vm href="/ovirt-engine/api/vms/6e969eca-b3d7-4b10-9022-34542d483415" id="6e969eca-b3d7-4b10-9022-34542d483415"/> <interface>virtio</interface> <linked>true</linked> <plugged>true</plugged> <vnic_profile href="/ovirt-engine/api/vnicprofiles/ef311433-8459-42b3-b65e-6ae01e77201c" id="ef311433-8459-42b3-b65e-6ae01e77201c"/> </nic> </nics> As you can see in the get response, the nic href is "/ovirt-engine/api/vms/...", but it should be "/ovirt-engine/api/templates/..." Version-Release number of selected component (if applicable): ovirt-engine-4.4.5.6-0.11.el8ev.noarch How reproducible: Occurred occasionally in automation tests. Steps to Reproduce: 1. Create a new template 2. Add a nic to the template 3. Get template nics Actual results: 1. The nic href is wrong in the get response as above Expected results: 1. The nic href in get response should be "/ovirt-engine/api/templates/..." Additional info:
Patch posted: https://gerrit.ovirt.org/c/ovirt-engine/+/113675
*** Bug 1932186 has been marked as a duplicate of this bug. ***
Verified on ovirt-engine-4.4.5.9-0.1.el8ev.noarch
This bugzilla is included in oVirt 4.4.5 release, published on March 18th 2021. Since the problem described in this bug report should be resolved in oVirt 4.4.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.