So I did a bit more digging today, to no real success. (maybe this should 
goto -dev? )

I found my infoblox dhcp plugin wasn't paying any attention to the 
from_ip_address and to_ip_address when finding unused ips, and fixed that, 
but I was pretty sure that wasn't the issue, and as expected, it didn't 
change this behavior. 


>From cranking up the logs to debug, when provisioning a discovered host, I 
never see the "unsued ip" proxy request come in...


Finally, digging into the discovery code a bit, it looks like the class 
ForemanDiscovery::HostConverter is whats doing the actual creation of a 
host, and since that just converts the discovered host object into a 
managed host, no change in hostname/ip/etc is done.

help? 


Is this by designed? How does this take into account the disjoint dhcp 
scope as recommended by the docs?


On Thursday, June 16, 2016 at 3:29:06 PM UTC-4, Matt wrote:
>
> 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 
>
>

-- 
You received this message because you are subscribed to the Google Groups 
"Foreman users" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to [email protected].
To post to this group, send email to [email protected].
Visit this group at https://groups.google.com/group/foreman-users.
For more options, visit https://groups.google.com/d/optout.

Reply via email to