Bug 1491155 - [Text] Report owner(s) of colliding MAC address if already in use
Summary: [Text] Report owner(s) of colliding MAC address if already in use
Keywords:
Status: CLOSED CURRENTRELEASE
Alias: None
Product: ovirt-engine
Classification: oVirt
Component: BLL.Network
Version: 4.2.0
Hardware: x86_64
OS: Linux
low
medium
Target Milestone: ovirt-4.2.4
: ---
Assignee: Ales Musil
QA Contact: Michael Burman
URL:
Whiteboard:
Depends On:
Blocks:
TreeView+ depends on / blocked
 
Reported: 2017-09-13 08:08 UTC by Michael Burman
Modified: 2018-06-26 08:39 UTC (History)
3 users (show)

Fixed In Version: ovirt-engine-4.2.4.1
Doc Type: If docs needed, set a value
Doc Text:
Clone Of:
Environment:
Last Closed: 2018-06-26 08:39:17 UTC
oVirt Team: Network
rule-engine: ovirt-4.2+
rule-engine: ovirt-4.3+


Attachments (Terms of Use)


Links
System ID Private Priority Status Summary Last Updated
oVirt gerrit 86931 0 master MERGED core: Add methods to find which VM is using MAC 2018-05-07 08:40:47 UTC
oVirt gerrit 91281 0 ovirt-engine-4.2 MERGED core: Add methods to find which VM is using MAC 2018-05-29 08:19:49 UTC

Description Michael Burman 2017-09-13 08:08:25 UTC
Description of problem:
[Text] - Improve the new text in the error message for MAC is already in use.

We have added a new to text error message if trying assign MAC address which is already in use - 

"Error while executing action: 

VM11:
MAC Address 00:00:00:00:00:26 is already in use. It can be used either by some nic of VM or by nic in one of snapshots in system."

The text should be fixed and improved, currently it's confusing and user/admin may think that we suggesting and not warning that the MAC is already used by other VM or snapshot.

1) MAC Address 00:00:00:00:00:26 is already in use. It is in use by VM<name> or it is in use by snapshot<name> in the cluster.
2) VM name/snapshot name must be specified in the error message, to let the admin/user know which VM or snapshot using this MAC address 

Version-Release number of selected component (if applicable):
4.2.0-0.0.master.20170912134930.gitc81ca84.el7.centos

Comment 1 Martin Mucha 2017-09-18 08:12:09 UTC
ad 1) text replacement "can be" -> "is" can be done.

ad 2) message is produced in two places

2.1 — when adding/updating VM nic. In that case, mac pool is consulted if mac is free. If it's not, message is produced. But original design does not contain information who owns given mac, only that it's owned by someone. We can easily query all VmNics in system, but we also have to deserialize all snapshots and you don't want to do that, that's going to be slow. So either we can live with 'undefined' slowness, or we have to refactor mac pools, so that they also know, who owns which mac. I believe we don't want neither.

2.2 - when plugging nic, following method is called. org.ovirt.engine.core.bll.network.VmInterfaceManager#existsPluggedInterfaceWithSameMac

all plugged nics with same mac are scanned in DB (not in snapshots), and we can provide specific VM/s NIC/s in error message.

---
Dan please decide if you want anything from 2.1

Comment 2 Dan Kenigsberg 2017-09-18 20:17:15 UTC
We surely do NOT want to refactor mac pools.

On the other hand, is it really too slow to scan for the owner of a MAC, only on the very rare case that someone explicitly asked for a colliding MAC? We now do the scan on Engine startup, so it should not be too hard to estimate it.

Comment 3 Martin Mucha 2017-09-19 14:37:23 UTC

for 1 macPoolId, we have to scan all clusters using it. For each such cluster we read all VMs from db, and for each VM we have to obtain all its nics. This is easy part. For every stateless running VM, we have to fetch it's original snapshot, which is stored in ovf in db.

For time estimation, I need to know typical number of clusters using 1 macPool,  number of VMs in it, and number of VMs running stateless in it.

Comment 4 Dan Kenigsberg 2017-09-19 20:18:56 UTC
the time seems linear in the number of VMs and the number of snashots. Can you provide an estimate for 100 VMs with one snapshot each, each with a single vNIC?

Comment 5 Michael Burman 2018-06-03 13:27:35 UTC
Verified on - 4.2.4.1-0.1.el7

MAC Address 00:00:00:00:00:53 is already in use by VM or snapshot: V2.

Comment 6 Sandro Bonazzola 2018-06-26 08:39:17 UTC
This bugzilla is included in oVirt 4.2.4 release, published on June 26th 2018.

Since the problem described in this bug report should be
resolved in oVirt 4.2.4 release, it has been closed with a resolution of CURRENT RELEASE.

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


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