Note: This bug is displayed in read-only format because the product is no longer active in Red Hat Bugzilla.

Bug 877731

Summary: MaxMacsCountInPool configuration entry does not work well
Product: Red Hat Enterprise Virtualization Manager Reporter: Rami Vaknin <rvaknin>
Component: ovirt-engineAssignee: Nobody's working on this, feel free to take it <nobody>
Status: CLOSED WORKSFORME QA Contact:
Severity: high Docs Contact:
Priority: unspecified    
Version: 3.1.0CC: dyasny, iheim, lpeer, msalem, Rhev-m-bugs, sgrinber, yeylon, ykaul
Target Milestone: ---   
Target Release: ---   
Hardware: Unspecified   
OS: Unspecified   
Whiteboard: network
Fixed In Version: Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of: Environment:
Last Closed: 2012-12-05 09:48:03 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 logs none

Description Rami Vaknin 2012-11-18 11:07:04 UTC
Created attachment 647135 [details]
engine logs

Version:
si24.1

Scenario:
I configured my mac range to include x addresses, and MaxMacsCountInPool to include 1.5*x addressses and I can't add vm nic, I get error that there are not enough mac addresses in the pool.
It looks like I need to configure MaxMacsCountInPool to have more than 2*x addresses in order to be able to assign mac address to vm nic.
I also can't remove vm.

Failure while trying to add nic to vm:
2012-11-15 13:59:14,086 WARN  [org.ovirt.engine.core.bll.AddVmInterfaceCommand] (ajp-/127.0.0.1:8702-8) [705b5058] CanDoAction of action AddVmInterface failed. Reasons:VAR__ACTION__ADD,VAR__TYPE__INTERFACE,MAC_POOL_NOT_ENOUGH_MAC_ADDRESSES


Example of exception I get while trying to remove vm:
2012-11-18 08:50:11,235 ERROR [org.ovirt.engine.core.bll.EntityAsyncTask] (pool-4-thread-92) EntityAsyncTask::EndCommandAction [within thread]: EndAction for action type RemoveVm threw an exception: org.ovirt.engine.core.common.errors.Vd
cBLLException: VdcBLLException: MAC_POOL_NOT_INITIALIZED
        at org.ovirt.engine.core.bll.MacPoolManager.freeMac(MacPoolManager.java:169) [engine-bll.jar:]
        at org.ovirt.engine.core.bll.VmCommand.RemoveVmNetwork(VmCommand.java:217) [engine-bll.jar:]
        at org.ovirt.engine.core.bll.RemoveVmCommand.RemoveVmFromDb(RemoveVmCommand.java:206) [engine-bll.jar:]
        at org.ovirt.engine.core.bll.RemoveVmCommand.EndVmCommand(RemoveVmCommand.java:235) [engine-bll.jar:]
        at org.ovirt.engine.core.bll.VmCommand.endSuccessfully(VmCommand.java:275) [engine-bll.jar:]
        at org.ovirt.engine.core.bll.CommandBase.internalEndSuccessfully(CommandBase.java:512) [engine-bll.jar:]
        at org.ovirt.engine.core.bll.CommandBase.endActionInTransactionScope(CommandBase.java:459) [engine-bll.jar:]
        at org.ovirt.engine.core.bll.CommandBase.runInTransaction(CommandBase.java:1374) [engine-bll.jar:]
...
...

Comment 1 lpeer 2012-11-25 08:44:24 UTC
Can you please specify what range did you define and what is the value you used for MaxMacsCountInPool?

From the code it seems like the only validation there is with MaxMacsCountInPool is that the amount of MACs we have in the ranges does not exceed the MaxMacsCountInPool.

The second error is related to the fact that the MAC pool was not initialized.

Comment 2 Rami Vaknin 2012-11-25 11:01:22 UTC
00:1A:4A:23:A0:00-00:1A:4A:24:A0:FF while MaxMacsCountInPool = 100,000.

Comment 3 Muli Salem 2012-11-29 07:55:36 UTC
Unable to reproduce. rvaknin, are you sure the values were not different ?

Comment 4 Rami Vaknin 2012-12-05 09:48:03 UTC
I couldn't reproduce either. I've tried also with small values and now it works for me. closing this bug.