Bug 1011116 - Update NIC doesn't actually update the NIC if only network is passed (without passing VNIC profile)
Update NIC doesn't actually update the NIC if only network is passed (without...
Product: Red Hat Enterprise Virtualization Manager
Classification: Red Hat
Component: ovirt-engine-restapi (Show other bugs)
x86_64 Linux
high Severity high
: ---
: 3.3.0
Assigned To: Moti Asayag
Meni Yakove
Depends On:
Blocks: 3.3snap1
  Show dependency treegraph
Reported: 2013-09-23 12:08 EDT by tgeft
Modified: 2016-02-10 14:48 EST (History)
8 users (show)

See Also:
Fixed In Version: is19
Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of:
Last Closed:
Type: Bug
Regression: ---
Mount Type: ---
Documentation: ---
Verified Versions:
Category: ---
oVirt Team: Network
RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: ---

Attachments (Terms of Use)

External Trackers
Tracker ID Priority Status Summary Last Updated
oVirt gerrit 19755 None None None Never
oVirt gerrit 19903 None None None Never

  None (edit)
Description tgeft 2013-09-23 12:08:34 EDT
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):

How reproducible:

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:

Actual results:

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

[org.ovirt.engine.core.bll.network.vm.UpdateVmInterfaceCommand] (ajp-/ 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-/ 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 08:35:03 EDT
works in is19
Comment 3 Itamar Heim 2014-01-21 17:24:46 EST
Closing - RHEV 3.3 Released
Comment 4 Itamar Heim 2014-01-21 17:25:36 EST
Closing - RHEV 3.3 Released
Comment 5 Itamar Heim 2014-01-21 17:29:08 EST
Closing - RHEV 3.3 Released

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