I’m having an issue with Foreman IPAM provisioning.
We’re using at this time the Infoblox DHCP/DNS module for our host IP provisioning, and we’re having an issue regarding the concurent creation of hosts.
We’re using IPAM DHCP for getting new addresses on the hosts.
All hosts are created through an API call.
Instead, we’re seeing that the hosts we’re creating in parallel are all getting the same IP (the next free IP available).
What I was expecting to happen is that each host should get its own IP and this IP should be reserved to the host at the time it get it.
Have you encountered such situation already ?
How do we deal with it ?
AFAIR this limitation does not exists in the ISC DHCP implementation unless you really ran out of IP’s. so I would assume its the infoblox provider which doesn’t “remember” which IP’s were offered?
The fix lzap is referring to is not applicable for infoblox dhcp provider, which uses infoblox API to retrieve free ip addresses.
I’m not sure this can be fixed (or they would be interested in such a change) on infoblox side, as this use case is somewhat unusual. Infoblox supports different modes of free ip lookups (ranges vs. networks), and at this point I’m not sure if it’s possible (or feasible) to replace infoblox implementation with smart-proxy one.
In that case, you can try using Random DB IP IPAM which Foreman has from version I think 1.16 onwards. It’s basically a simple DB IPAM but it does not give you addresses in sequence, but in randomized order. Then you need to make sure all IPs in the subnet/range on Infoblox are managed only by Foreman (so there is no collision). That should work ™.
I don’t understand the point. My problem is two concurrent calls the create hosts API gets the same IP.
I’m not doing two reservations through different ways. Foreman should prevent this whatever DHCP is used.
Maybe the problem is that foreman creates the IP after creating the VM, leading to the IP already used problem.
Between the suggested IP in the creation form and the effective creation of the IP, the windows is rather large.