Bug 1396995

Summary: when Add nic fail on Mac address is already in use, the Mac address is not mentioned in any log
Product: [oVirt] ovirt-engine Reporter: Ilanit Stein <istein>
Component: BLL.NetworkAssignee: Martin Mucha <mmucha>
Status: CLOSED CURRENTRELEASE QA Contact: Michael Burman <mburman>
Severity: medium Docs Contact:
Priority: low    
Version: 4.0.5CC: bugs, danken, gklein, lsurette, mburman, rbalakri, Rhev-m-bugs, srevivo, ykaul
Target Milestone: ovirt-4.1.0-betaFlags: rule-engine: ovirt-4.1+
Target Release: 4.1.0.2   
Hardware: Unspecified   
OS: Unspecified   
Whiteboard:
Fixed In Version: ovirt-engine-4.1.0-0.4.master.20170104181027.gitab0e3f4.el7.centos.noarch.rpm Doc Type: If docs needed, set a value
Doc Text:
Story Points: ---
Clone Of: Environment:
Last Closed: 2017-02-01 14:57:38 UTC Type: Bug
Regression: --- Mount Type: ---
Documentation: --- CRM:
Verified Versions: Category: ---
oVirt Team: Network RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: --- Target Upstream Version:
Embargoed:
Attachments:
Description Flags
engine.log none

Description Ilanit Stein 2016-11-21 11:04:21 UTC
Description of problem:
When CFME provision a VM from template, along with adding a nic,
and add nic fail on Mac address is already in use,
there is no place where the Mac address can be found.
(CFME add nic request is done via RestAPI)

Version-Release number of selected component (if applicable):
RHV-4.0.5
CFME-5.7.0.11

Expected results:
MAC address should be mentioned in some log (audit.log/engine.log/other log).

Additional info:
2016-11-21 11:13:28,511 INFO  [org.ovirt.engine.core.bll.network.vm.AddVmInterfaceCommand] (default task-52) [45120532] Running command: AddVmInterfaceCommand internal: false. Entities affected :  ID: 9f8da78f-31d2-4752-9942-9fd55654da6d Type: VMAction group CONFIGURE_VM_NETWORK with role type USER,  ID: 0000000a-000a-000a-000a-000000000398 Type: VnicProfileAction group CONFIGURE_VM_NETWORK with role type USER
2016-11-21 11:13:28,616 WARN  [org.ovirt.engine.core.bll.network.vm.ActivateDeactivateVmNicCommand] (default task-52) [1d818dd0] Validation of action 'ActivateDeactivateVmNic' failed for user admin@internal-authz. Reasons: VAR__ACTION__ACTIVATE,VAR__TYPE__INTERFACE,NETWORK_MAC_ADDRESS_IN_USE
2016-11-21 11:13:28,639 INFO  [org.ovirt.engine.core.bll.network.vm.AddVmInterfaceCommand] (default task-52) [1d818dd0] Command [id=8bb72e74-eee4-4e13-adba-df0eb5205331]: Compensating NEW_ENTITY_ID of org.ovirt.engine.core.common.businessentities.VmDevice; snapshot: VmDeviceId:{deviceId='09711d44-04ae-475e-accd-c382f84e9aa1', vmId='9f8da78f-31d2-4752-9942-9fd55654da6d'}.
2016-11-21 11:13:28,640 INFO  [org.ovirt.engine.core.bll.network.vm.AddVmInterfaceCommand] (default task-52) [1d818dd0] Command [id=8bb72e74-eee4-4e13-adba-df0eb5205331]: Compensating NEW_ENTITY_ID of org.ovirt.engine.core.common.businessentities.network.VmNetworkStatistics; snapshot: 09711d44-04ae-475e-accd-c382f84e9aa1.
2016-11-21 11:13:28,642 INFO  [org.ovirt.engine.core.bll.network.vm.AddVmInterfaceCommand] (default task-52) [1d818dd0] Command [id=8bb72e74-eee4-4e13-adba-df0eb5205331]: Compensating NEW_ENTITY_ID of org.ovirt.engine.core.common.businessentities.network.VmNetworkInterface; snapshot: 09711d44-04ae-475e-accd-c382f84e9aa1.
2016-11-21 11:13:28,670 INFO  [org.ovirt.engine.core.bll.network.vm.AddVmInterfaceCommand] (default task-52) [1d818dd0] Command [id=8bb72e74-eee4-4e13-adba-df0eb5205331]: Compensating DELETED_OR_UPDATED_ENTITY of org.ovirt.engine.core.common.businessentities.VmStatic; snapshot: id=9f8da78f-31d2-4752-9942-9fd55654da6d.
2016-11-21 11:13:28,698 ERROR [org.ovirt.engine.core.dal.dbbroker.auditloghandling.AuditLogDirector] (default task-52) [1d818dd0] Correlation ID: 45120532, Call Stack: null, Custom Event ID: -1, Message: Failed to add Interface nic1 (VirtIO) to VM vm_prov_from_cfme. (User: admin@internal-authz)
2016-11-21 11:13:28,699 ERROR [org.ovirt.engine.api.restapi.resource.AbstractBackendResource] (default task-52) [] Operation Failed: [MAC Address is already in use.]

Comment 1 Ilanit Stein 2016-11-24 13:22:47 UTC
Created attachment 1223860 [details]
engine.log

Comment 2 Michael Burman 2016-12-28 06:42:25 UTC
The fix isn't on 4.1.0-0.3.beta2.el7, only in master.

Comment 3 Michael Burman 2017-01-05 07:32:32 UTC
Verified on - 4.1.0-0.4.master.20170104122005.git51b1bcf.el7.centos

engine.log - 

2017-01-05 09:31:07,981+02 WARN  [org.ovirt.engine.core.bll.network.vm.AddVmInterfaceCommand] (default task-5) [609242e7-52cb-4b9f-a1c0-62dd1dea8f8f] Validation of action 'AddVmInterface' failed for user admin@internal-authz. Reasons: VAR__TYPE__INTERFACE,VAR__ACTION__ADD,NETWORK_MAC_ADDRESS_IN_USE,$NETWORK_MAC_ADDRESS_IN_USE_ENTITY 00:00:00:00:00:22