Bug 1537414
| Summary: | Engine trying to assign MAC addresses which are in use by VMs in a different cluster | ||||||
|---|---|---|---|---|---|---|---|
| Product: | [oVirt] ovirt-engine | Reporter: | Michael Burman <mburman> | ||||
| Component: | BLL.Network | Assignee: | Leon Goldberg <lgoldber> | ||||
| Status: | CLOSED DUPLICATE | QA Contact: | Michael Burman <mburman> | ||||
| Severity: | high | Docs Contact: | |||||
| Priority: | high | ||||||
| Version: | 4.2.1.1 | CC: | alkaplan, bpelled, bugs, danken, eraviv, ratamir | ||||
| Target Milestone: | ovirt-4.3.0 | Flags: | rule-engine:
ovirt-4.3+
rule-engine: blocker+ |
||||
| 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: | 2018-08-08 08:49:12 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: | |||||||
| Bug Depends On: | 1492577, 1593800, 1639460, 1767319 | ||||||
| Bug Blocks: | |||||||
| Attachments: |
|
||||||
|
Description
Michael Burman
2018-01-23 06:52:10 UTC
Further investigation shows that this bug affected directly by the wrong implementation in BZ 1492577. If it's only one cluster with 1 MAC pool range everything behaves as expected. Problems occurs when you have 2 clusters, with different MAC pools, but some of the MACs are in the same range. Example - 2 clusters, each with it's own MAC pool range, but has some equal MAC addresses in the range. So if you have a VM1 in cluster1 and you add a vNIC to it, then when you will try to add a vNIC to VM2 in cluster2, engine will try to assign the same MAC address as he assigned to VM1 and then he will show warning that the MAC is already in use. Doesn't exist in 4.1, only 4.2 The original design of the mac pool feature is that each mac pool manages its macs. It means that different mac pools can have vms with the same mac addresses. The bug is that in ActivateVm command (a command which is called when the vnic is marked as 'plugged') we validate there is not mac in the whole SYSTEM identical to the mac of the updated/created vnic. It means that even if the mac doesn't exist in the relevant mac pool (which is the case) we can get a validation error if the mac is used in another mac pool. The bug can be easily fixed by changing the validation in activateVm command to check only the relevant mac pool. But maybe the design was wrong in the first place and this bug safes us from having duplicate macs in the system... There are some ways to make the bug to 'appear'. 1. Having mac pools with overlapping ranges. 2. Adding custom macs from the range of another mac pool. 3. Moving vm to a different cluster (with different mac pool). 4. Changing the mac pool of a cluster that already have vms with allocated macs from the old mac pool. (This is what happened in the tested environment), BTW, I managed to reproduce the bug in 4.1. The are several possible solutions to the problem. 1. Redesign the feature to have only one mac pool per the whole system. Only adding ranges per cluster. 2. Leave the original design as is. 2.1 Fix the validation in ActivateVm command to check only in the relevant mac pool and not the whole system. 2.2 Adding a warning when doing actions that may cause the bug to appear (creating new mac pool with overlapping range, etc.) 2.3 Adding and audit log that warns the user (once a day?) if there are duplicate macs in the system. (In reply to Michael Burman from comment #3) > Doesn't exist in 4.1, only 4.2 I mananged to reproduce it in 4.1. (In reply to Alona Kaplan from comment #5) > (In reply to Michael Burman from comment #3) > > Doesn't exist in 4.1, only 4.2 > > I mananged to reproduce it in 4.1. Nice, then i'm removing the regression flag. Thanks for checking me on that)) I don't like the idea of "Allow Duplicates" - it may create a lot of trouble and mess - and therefore I think that the first solution (a single mac-pool to the whole system with the possibility of assigning ranges to clusters) is the right solution, Of course we need to make sure that there is NO possibility to set two overlapping ranges, and the association of range to specific cluster should be from the same screen as the mac-pool management. If someone insists that he needs an environment with the ability to set duplicate macs, we can add this as an option in 'engine-config' tool (instead of the check-box that exists today) so that it will not confuse anyone and no one will start it by mistake, In addition we need to take into account cases of moving VMs between clusters or changing existing range settings etc. *** This bug has been marked as a duplicate of bug 1593800 *** |