Bug 1446913

Summary: Engine tries to re-assign MAC address from the wrong pool after VM was moved to another cluster
Product: [oVirt] ovirt-engine Reporter: Michael Burman <mburman>
Component: BLL.NetworkAssignee: Dan Kenigsberg <danken>
Status: CLOSED DEFERRED QA Contact: Meni Yakove <myakove>
Severity: medium Docs Contact:
Priority: unspecified    
Version: 4.1.2CC: bugs, ylavi
Target Milestone: ---   
Target Release: ---   
Hardware: x86_64   
OS: Linux   
Whiteboard:
Fixed In Version: Doc Type: If docs needed, set a value
Doc Text:
Story Points: ---
Clone Of: Environment:
Last Closed: 2017-05-17 07:59:16 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 Michael Burman 2017-04-30 12:30:17 UTC
Created attachment 1275276 [details]
engine log

Description of problem:
Engine tries to re-assign MAC address from the wrong pool after VM was moved to another cluster. 

In case of moving a VM to a different cluster in the DC, the NAC addresses are get released(see BZ 1410440), but engine still trying to assign MAC addresses to the VM from the old pool, and not from the new cluster pool, although the VM is already moved to a new pool with a different MAC address range.

Version-Release number of selected component (if applicable):
4.1.2-0.1.el7

How reproducible:
100%

Steps to Reproduce:
1. Create cluster1 with only 1 MAC address in the pool - poolA
2. Create VM with 1 vNIC in this cluster 
3. Move VM to cluster2 which has a different MAC pool range - poolB
4. Create new VM in cluster1 and try to add vNIC

Actual results:
Failed. step 4. Engine complain about MAC address already in use.
engine trying to re-assign the same MAC address to the VM, although it's already running on different cluster with a different pool.

Expected results:
If VM moved to a different cluster, then the MAC addresses should be assigned from the correct MAC pool range, as now the MAC pool range is per cluster, and not per DC. 

Additional info:
See also - BZ 1410440

Comment 1 Meni Yakove 2017-04-30 17:42:03 UTC
To be more clear (mburman, please let me know if I wrong), The new VM on cluster1 is getting the MAC from the correct pool (cluster1 pool) but this MAC (since we have only 1 MAC in that pool) is used by the old VM (that is now on cluster2) but since MAC pool is per cluster do we need to check duplicate MACs across clusters?

I think the clusters should be separated and duplicate check should be in the cluster domain.

Comment 2 Yaniv Lavi 2017-05-17 07:59:16 UTC
We can not make such a big change in 4.x.
If a customer requests this, we will consider creating a option of different behaviors.