Provision to IP of subnet not defined at install


  • Can’t provision a server to a network not associated with the DHCP subnet.

Expected outcome:

  • I would like to be able to create a subnet (outside of the DHCP range) to be able to provision servers with networking across a very large number of subnets.

Foreman and Proxy versions:

[root@master dhcpd]# hammer --version
hammer (0.3.0)
 * hammer_cli_foreman (0.3.0)
 * hammer_cli_foreman_discovery (0.0.2)

Other relevant data:

  • It seems that Foreman expects the subnet to be configured @ install. Would this mean that I have to configure every subnet in the datacenter on install? What if new subnets are created?
[28/Mar/2019:12:25:31 -0400] "GET /tftp/serverName HTTP/1.1" 200 29 0.0013
E, [2019-03-28T12:25:31.300606 #23246] ERROR -- : Record not found
E, [2019-03-28T12:25:31.541569 #23246] ERROR -- : No Subnet detected for: "$NETWORK_ADDRESS"
  • On GUI
Unable to save
Create DHCP Settings for mac0025904788ea task failed with the following error: ERF12-6899 [ProxyAPI::ProxyException]: Unable to set DHCP entry ([RestClient::BadRequest]: 400 Bad Request) for proxy https://foreman:8443/dhcp
  • Using the primary subnet that is configured for DHCP works fine.
  • My user story is I just want to be able to provision servers with no plans for using Foreman for anything else at the moment.
  • The logic would be, auto-discover the server via a DHCP private range, api to create the subnet, provision the server with an IP address that could be 1 of 100s/1000s of subnets, then delete the host/subnet from Foreman. Is this possible with Foreman other than having to re-install every time?

Wanted to update this thread, I am still working on this. I think I have found what I should be doing which is having a separate virtual NIC for PXEboot. I can’t seem to get it to work though. Is there any documentation for setting up PXE boot to be on its own virtual NIC?

From what I understand, I set the physical interface as primary, and unmanaged/not provisioning, then make a virtual interface that is managed/provisioning but I can’t seem to get it to work due to various errors. If needed, I can provide them but I wanted to make sure I am not doing it completely wrong in the first place. Or perhaps there is a better way to accomplish what I am trying to do. I have attached a picture of the networking configuration.

Hello, every single subnet you want to create IP reservations for need to be added into Foreman. The installer can create one initial subnet for you and also set up ISC DHCP configuration with this subnet. Additional subnets can be also added by the installer using hiera.yaml file, or you can manage those subnets manually via conf file changing.

All subnets you add into dhcpd.conf you need to add in Foreman UI as well, you can use API/CLI to add them if you have many of them. Apparently if you want to PXE boot your servers, you need DHCP under Foreman’s control so then you need all of these subnets to be created.