Red Hat Bugzilla – Bug 1011116
Update NIC doesn't actually update the NIC if only network is passed (without passing VNIC profile)
Last modified: 2016-02-10 14:48:59 EST
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):
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:
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.
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).
The correct behavior for choosing a profile for the NIC when just the network is provided is shown by addNIC action.
works in is19
Closing - RHEV 3.3 Released