So, i've been playing with discovery a bit, and am getting ready to
hopefully use it in a few hundred node bare metal deploy soon. However,
hitting a bit of a wall right now…first my setup:
- Got a network hosts using discovery will be on. lets say its
192.168.1.0/24. - DHCP (which in this case is infoblox, but, it shouldn't mater AFAIK), is
setup with a dhcp range for 192.168.1.200->192.168.1.254. - Subnet is defined in foreman, with the smart proxy managing it. Optional
start/end of IP address range there is 192.168.1.5->192.168.1.199. So, as
per the docs, disjoint. - Discovery rule setup for hosts come from this network/subnet
My understanding would be that the following should happen:
node boots, PXE kicks in, it leases and address from the high range
(200->254). Downloads discovery image. Boots it, sends facts.
Foreman get facts, I click auto-provision.
This is where it goes off the rails a bit…
I would expect foreman to now select an IP from the defined range (5->199),
send that to the proxy to get put into dns, name the host accordingly (I'm
naming based on ip), and reboot the host.
What happens is the host gets assigned the same IP it booted with(from the
DHCP defined range, not the one foreman has been told about), and the
hostname is based off of that.
This give me a couple problems:
1). That upper range will fill up with reservations, eventually leaving no
leases in the range for new hosts to use for discovery.
2). Sadly, infoblox, when creating records inside a dhcp range, needs a
restart. So until that happens those records (which i don't want anyways)
aren't "live".
What I've done to rule a few things out:
Started with direct discovery (no smart proxy plugin for discovery), and
with IPAM for the subnet set to DHCP.
Tried swapping to a smart-proxy discovery provider, no change, other than
now the smart-proxy is being used(which is a good thing).
Tried switching the IPAM setting to internal, hoping foreman would then
honor the IP range setting(s), no change.
So this leave me asking…uh, what?
Is this…expected behavior? Should the discovery provisioning process be
re-using the IP used in the first phase, or should it be asking for a new
one? (if i click provision and then go into the interface and have it
suggest a new IP, it gets it from the right range)
help?
Matt