Bug 1011116 - Update NIC doesn't actually update the NIC if only network is passed (without passing VNIC profile)
Summary: Update NIC doesn't actually update the NIC if only network is passed (without...
Keywords:
Status: CLOSED CURRENTRELEASE
Alias: None
Product: Red Hat Enterprise Virtualization Manager
Classification: Red Hat
Component: ovirt-engine-restapi
Version: 3.3.0
Hardware: x86_64
OS: Linux
high
high
Target Milestone: ---
: 3.3.0
Assignee: Moti Asayag
QA Contact: Meni Yakove
URL:
Whiteboard: network
Depends On:
Blocks: 3.3snap1
TreeView+ depends on / blocked
 
Reported: 2013-09-23 16:08 UTC by tgeft
Modified: 2016-02-10 19:48 UTC (History)
8 users (show)

Fixed In Version: is19
Doc Type: Bug Fix
Doc Text:
Clone Of:
Environment:
Last Closed:
oVirt Team: Network
Target Upstream Version:
Embargoed:


Attachments (Terms of Use)


Links
System ID Private Priority Status Summary Last Updated
oVirt gerrit 19755 0 None None None Never
oVirt gerrit 19903 0 None None None Never

Description tgeft 2013-09-23 16:08:34 UTC
Description of problem:
When updating a NIC and just passing the network as the parameter to be changed, the update appears to happen with no error although the NIC doesn't get updated at all.

After the introduction of VNIC profiles, the correct way to update a NIC's network is to update its VNIC profile but for backward compatibility updating the network should be supported as well.

Version-Release number of selected component (if applicable):
is15

How reproducible:
100%

Steps to Reproduce:
1. Prepare a NIC with some network on a VM.
2. Send an update NIC request with a different network as the parameter as follows:

PUT request content is --  url:/api/vms/09d3adf7-aaeb-416b-af57-acb18643120a/nics/f2990cc5-d452-4b76-ae5c-16e20b5bc251 body:
<nic>
    <network>
        <name>sw1</name>
    </network>
</nic>


Actual results:

The update appears to go through fine as shown on the engine log:

[org.ovirt.engine.core.bll.network.vm.UpdateVmInterfaceCommand] (ajp-/127.0.0.1:8702-2) Running command: UpdateVmInterfaceCommand internal: false. Entities affected :  ID: 09d3adf7-aaeb-416b-af57-acb18643120a Type: VM,  ID: c3c98e39-f11a-4efe-aa6b-8fc23d49d2ba Type: VnicProfile
2013-09-23 18:55:58,190 INFO  [org.ovirt.engine.core.dal.dbbroker.auditloghandling.AuditLogDirector] (ajp-/127.0.0.1:8702-2) Correlation ID: 2bc7e527, Call Stack: null, Custom Event ID: -1, Message: Interface nic1 (VirtIO) was updated for VM VMTest1.   (User: admin@internal)

However in the response the NIC keeps the profile it had and so stays on the same network.

Expected results:
The NIC's profile should be updated with a profile that doesn't contain port mirroring for the provided network (if such a profile exists, otherwise an error should be returned).

Additional info:
The correct behavior for choosing a profile for the NIC when just the network is provided is shown by addNIC action.

Comment 2 Martin Pavlik 2013-10-18 12:35:03 UTC
works in is19

Comment 3 Itamar Heim 2014-01-21 22:24:46 UTC
Closing - RHEV 3.3 Released

Comment 4 Itamar Heim 2014-01-21 22:25:36 UTC
Closing - RHEV 3.3 Released

Comment 5 Itamar Heim 2014-01-21 22:29:08 UTC
Closing - RHEV 3.3 Released


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