Bugzilla will be upgraded to version 5.0. The upgrade date is tentatively scheduled for 2 December 2018, pending final testing and feedback.
Bug 1485688 - [downstream clone - 4.1.7] [Pool] VMs are still created with duplicate MAC addresses after 4.0.7 upgrade
[downstream clone - 4.1.7] [Pool] VMs are still created with duplicate MAC ad...
Status: CLOSED ERRATA
Product: Red Hat Enterprise Virtualization Manager
Classification: Red Hat
Component: ovirt-engine (Show other bugs)
4.0.7
x86_64 Linux
high Severity urgent
: ovirt-4.1.7
: ---
Assigned To: Martin Mucha
Michael Burman
: ZStream
Depends On: 1435485
Blocks:
  Show dependency treegraph
 
Reported: 2017-08-27 04:07 EDT by rhev-integ
Modified: 2018-04-30 07:25 EDT (History)
18 users (show)

See Also:
Fixed In Version: ovirt-engine-4.1.7.2
Doc Type: Bug Fix
Doc Text:
This update fixes a Manager issue that allowed duplicate MAC addresses even when duplicates are disallowed.
Story Points: ---
Clone Of: 1435485
Environment:
Last Closed: 2017-11-07 12:27:54 EST
Type: ---
Regression: ---
Mount Type: ---
Documentation: ---
CRM:
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
Red Hat Knowledge Base (Solution) 2775081 None None None 2017-08-27 04:09 EDT
oVirt gerrit 75063 ovirt-engine-4.1 MERGED core: added logging message to MacPool 2017-09-27 05:10 EDT
oVirt gerrit 76309 master POST core: removing 'berserk' forceAddMac method 2017-08-27 04:09 EDT
oVirt gerrit 78132 master MERGED core: fixes & simplifications in MoveMacs.java 2017-08-27 04:09 EDT
oVirt gerrit 78146 master MERGED core: removal of addForce method from cluster and DC update. 2017-08-27 04:09 EDT
oVirt gerrit 78191 master MERGED core: simplified parameters passed to VmInterfaceManager#add 2017-08-27 04:09 EDT
oVirt gerrit 78192 master POST core: remove forceAddMac from VmInterfaceManager,ImportVmCommandBase 2017-08-27 04:09 EDT
oVirt gerrit 78193 master ABANDONED core: add validation for duplicate macs when importing vm 2017-08-27 04:09 EDT
oVirt gerrit 80450 master POST core: when initializing MacPool also register in it nics in snapshots 2017-08-27 04:09 EDT
oVirt gerrit 81566 ovirt-engine-4.1 MERGED core: fixes & simplifications in MoveMacs.java 2017-09-18 08:10 EDT
oVirt gerrit 81567 ovirt-engine-4.1 MERGED core: removal of addForce method from cluster and DC update. 2017-09-18 08:10 EDT
oVirt gerrit 81568 ovirt-engine-4.1 MERGED core: simplified parameters passed to VmInterfaceManager#add 2017-09-18 08:10 EDT
oVirt gerrit 81569 ovirt-engine-4.1 MERGED core: remove forceAddMac from VmInterfaceManager,ImportVmCommandBase 2017-09-18 08:10 EDT
oVirt gerrit 81570 ovirt-engine-4.1 MERGED core: removing 'berserk' forceAddMac method 2017-09-27 05:51 EDT
oVirt gerrit 81571 ovirt-engine-4.1 MERGED core: when initializing MacPool also register in it nics in snapshots 2017-09-27 05:51 EDT
oVirt gerrit 81654 ovirt-engine-4.1 POST core: Prevent an init race between Beans and Backend 2017-09-13 16:05 EDT
Red Hat Product Errata RHEA-2017:3138 normal SHIPPED_LIVE Red Hat Virtualization Manager (ovirt-engine) 4.1.7 2017-11-07 17:22:33 EST

  None (edit)
Description rhev-integ 2017-08-27 04:07:04 EDT
+++ This bug is a downstream clone. The original bug is: +++
+++   bug 1435485 +++
======================================================================

Description of problem:

We have a report of the following BZ not being fixed by it's 4.0.7 clone:
BZ1400043 - [Vm Pool] VMs are created with duplicate MAC addresses

First try of new version (4.0.7) resulted in 12 VMs with Duplicate MACs.

Version-Release number of selected component (if applicable):
rhevm-4.0.7.4-0.1.el7ev.noarch

(Originally by Germano Veit Michel)
Comment 7 rhev-integ 2017-08-27 04:07:40 EDT
Upgrade to 4.0.7 was from 4.0.6

(Originally by Germano Veit Michel)
Comment 8 rhev-integ 2017-08-27 04:07:47 EDT
One interesting thing is that they have 5-6 VM Pools. Could this increase the probability of hitting the bug? It seems very easy to hit in that environment.

(Originally by Germano Veit Michel)
Comment 10 rhev-integ 2017-08-27 04:07:59 EDT
A possible reproduction of the bug -

-Make sure the MacPool used by the dc doesn't allow duplicates.

1. Create a template with one vnic ('tmp1').
2. Create VmPool ('pool') from 'tmp1' with 2 vms ('pool-1' and 'pool-2'). Set the number of prestarted vms as 2.
3. Wait for the vms to be up.
4. Unplug the nic from vm 'pool-1' (lets call its current mac address 'x'). Change its mac address (new mac 'y'). Plug it back.
5. Add a vnic to vm 'pool-2' and set its mac address to 'x' (the old mac address of the vnic we uplugged and plugged).
6. Stop vm 'pool-1'.

Result - Both vms 'pool-1' and 'pool-2' have vnic with 'x' mac.


Explanation of what causes the bug - when stopping a vm that was started by the pool, the original snapshot (before the run) is restored. The macs of the vnics in the original snapshot are added to the mac pool using 'forceAdd'. It means that it ignores if the mac is already in the pool.
So if a mac in the original snapshot was taken by another vm. We will end up with duplicate macs.

(Originally by Alona Kaplan)
Comment 11 rhev-integ 2017-08-27 04:08:05 EDT
Latest logs after a new test (with the snapshot related errors fixed) do not show the problem anymore.

I believe we are hitting the scenario Alona described, as the MAC Pool was close to been exhausted therefore the chances of another VM taking the MAC of the original snapshot were quite high.

(Originally by Germano Veit Michel)
Comment 26 Michael Burman 2017-10-01 02:56:20 EDT
Verified on -  4.1.7.2-0.1.el7

Summary and results:

Stateless scenarios - PASS
Statefull/snapshot scenarios - PASS
Regression - All new regression bugs which has been caused by the fix for this report has been verified
Comment 28 errata-xmlrpc 2017-11-07 12:27:54 EST
Since the problem described in this bug report should be
resolved in a recent advisory, it has been closed with a
resolution of ERRATA.

For information on the advisory, and where to find the updated
files, follow the link below.

If the solution does not work for you, open a new bug report.

https://access.redhat.com/errata/RHEA-2017:3138

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