We have detected that is possible to generate the same AR (same IP, MAC and lease number) several times within the same VNET, OpenNebula does not complain about that just creates a new one with a different ID.
Is this done on purpose? It’s quite confusing because OpenNebula does not detect if the same AR is already available from the db and does not display any error message.
Ah ok thanks a lot, now it makes sense. During our tests we were creating (by mistake) the same template with same VLAN_ID , IPs, MACs and lease number. I don’t know if a --force option is required, maybe just check if the same template is already there… but I’m not sure if there is a use case where you need the same template with different AR IDs.
To add to this thread - we are using this feature of overlapping ARs to override mac addresses (albeit not an identical duplicate AR, but rather a 1-ip-sized AR with the different MAC address we want); I just commented on 4992 with some thoughts. Let me know what you think,
I have also included more feedback in https://dev.opennebula.org/issues/4992 and yes probably you can include several ARs with “almost” the same conf but different MACs and OpenNebula should use one or another depending on the VM template request.
The only issue is that you should take care if several VM templates are requesting different ARs with the same IP but different MACs… I dont know if OpenNebula will be able to detect that kind of IP/MAC conflicts…