Bug 842317

Summary: It's impossible to add unused MAC to NIC on VM (when adding it earlier failed for some reason - it is not freed)
Product: Red Hat Enterprise Virtualization Manager Reporter: GenadiC <gcheresh>
Component: ovirt-engineAssignee: Muli Salem <msalem>
Status: CLOSED CURRENTRELEASE QA Contact: GenadiC <gcheresh>
Severity: high Docs Contact:
Priority: medium    
Version: 3.1.0CC: dyasny, iheim, lpeer, masayag, myakove, Rhev-m-bugs, sgrinber, yeylon, ykaul
Target Milestone: ---   
Target Release: ---   
Hardware: x86_64   
OS: Linux   
Whiteboard: network
Fixed In Version: si13 Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of: Environment:
Last Closed: 2012-12-04 20:04:30 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
MAC in Use screenshot none

Description GenadiC 2012-07-23 13:01:30 UTC
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 13:03:21 UTC
Created attachment 599777 [details]
MAC in Use screenshot

Comment 2 lpeer 2012-07-23 13:56:37 UTC
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 10:06:34 UTC
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 14:42:18 UTC
Proposed patch in http://gerrit.ovirt.org/#/c/6708/

Comment 5 Muli Salem 2012-07-29 14:45:58 UTC
fixed in 848453e8293f616f060d362810d42115d8ec752c.

Flags were reset by me by accident - all flags were already given beforehand.

Comment 6 GenadiC 2012-08-05 11:45:21 UTC
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 11:53:01 UTC
(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 14:08:53 UTC
Verified in SI13