Bug 842317 - It's impossible to add unused MAC to NIC on VM (when adding it earlier failed for some reason - it is not freed)
It's impossible to add unused MAC to NIC on VM (when adding it earlier failed...
Status: CLOSED CURRENTRELEASE
Product: Red Hat Enterprise Virtualization Manager
Classification: Red Hat
Component: ovirt-engine (Show other bugs)
3.1.0
x86_64 Linux
medium Severity high
: ---
: ---
Assigned To: Muli Salem
GenadiC
network
:
Depends On:
Blocks:
  Show dependency treegraph
 
Reported: 2012-07-23 09:01 EDT by GenadiC
Modified: 2016-02-10 14:53 EST (History)
9 users (show)

See Also:
Fixed In Version: si13
Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of:
Environment:
Last Closed: 2012-12-04 15:04:30 EST
Type: Bug
Regression: ---
Mount Type: ---
Documentation: ---
CRM:
Verified Versions:
Category: ---
oVirt Team: Network
RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: ---


Attachments (Terms of Use)
engine log (2.47 MB, application/octet-stream)
2012-07-23 09:01 EDT, GenadiC
no flags Details
MAC in Use screenshot (162.80 KB, image/png)
2012-07-23 09:03 EDT, GenadiC
no flags Details

  None (edit)
Description GenadiC 2012-07-23 09:01:30 EDT
Created attachment 599776 [details]
engine log

Description of problem:

If adding of VNIC with some specific MAC fails for some reason(for example adding Non VM Network for VM), that MAC can't be used again in the correct scenario (adding VM network for VM)

How reproducible:
Always

Steps to Reproduce:
1. Create VM with NIC
2. Add another NIC with specific MAC and Non VM Network
3. When 2 fails changed the Non VM Network to VM Network
4. Try to add this NIC with specific MAC and VM Network
  
Actual results:
Error message "MAC is already in use"

Expected results:
The NIC should be added to VM with that specific MAC address

Additional info:
Reset to ovirt-engine solves the problem as MAC address is stucked in memory
Comment 1 GenadiC 2012-07-23 09:03:21 EDT
Created attachment 599777 [details]
MAC in Use screenshot
Comment 2 lpeer 2012-07-23 09:56:37 EDT
the solution should be to release the allocated MAC when can-do-action of UpdateVmInterface and AddVmInterface fails.
Comment 3 Meni Yakove 2012-07-26 06:06:34 EDT
Another scenario:

1. Create VM and add network.
2. Copy the MAC address from the VM network interface.
3. Delete the VM.
4. Try to create another nic to new/existing VM with the same MAC address (From the delete VM)
Comment 4 Muli Salem 2012-07-29 10:42:18 EDT
Proposed patch in http://gerrit.ovirt.org/#/c/6708/
Comment 5 Muli Salem 2012-07-29 10:45:58 EDT
fixed in 848453e8293f616f060d362810d42115d8ec752c.

Flags were reset by me by accident - all flags were already given beforehand.
Comment 6 GenadiC 2012-08-05 07:45:21 EDT
Livnat, it's a problem to verify it at the moment because in SI13  you can't add NON_VM network to VM - step2 (solution to another BZ).
I would like to get suggestion how to reproduce this
Comment 7 lpeer 2012-08-05 07:53:01 EDT
(In reply to comment #6)
> Livnat, it's a problem to verify it at the moment because in SI13  you can't
> add NON_VM network to VM - step2 (solution to another BZ).
> I would like to get suggestion how to reproduce this

There is the option to test this via the REST api were there is no blocking of assigning non-vm networks and it goes all the way to the backend (which should block this).
Comment 8 GenadiC 2012-08-05 10:08:53 EDT
Verified in SI13

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