Foreman 1.7 started giving out bad IPv4 assignments

After upgrading to 1.7 Foreman started to give out seemingly random IPv4
assignments. This included IP address that were already assigned statically
to hosts on the subnet. This was not an issue in 1.4 and needless to say
this caused me a lot of grief as I had to manually manipulate the ip
addresses, and sometimes change the hosts manually to static assignments,
to work around this issue.

These were hosts that were working fine with 1.4.

I did not see any reference in the documentation regarding such a feature,
but I did find in the web configuration this option under subnets.

IPAM IP Address auto suggestion mode for this subnet, DHCP works with DHCP
proxy only

I set this to None, hopefully DHCP will still function but foreman will
no longer try to be clever and pick random and wrong IPv4 addresses, even
if that host has one assigned in the foreman database. However if there is
anywhere else I need to check to prevent this unwanted behavior please let
me know. :slight_smile:


What platform are you running the DHCP proxy on?

Been having the same issue on Windows and narrow the issue down to
subnet.rb. The system ping command is trying to ping with Linux options
such as -c for count instead of -n on Windows and on Windows the timeout is
a lowercase w. And one more issue that Windows useds NUL instead of