Problem provisioning with multiple interfaces

Hello all,

Foreman version 1.15 on RHEL 7.3

Am having problem in creating new provisioning profile, in foreman UI under infrastructure < provisioning setup < set up provisioning. I already have one setup and its working I have created new host by pxe. In our environment we have different subnets dev, qa, prod, utility. I tried to create new provisioning set up for qa but I can’t submit prerequisites and move to network config

I have followed blog and able to add additional subnets but I couldn’t add multiple provisioning profiles.

I have below logs from /var/log/foreman/production.log

I see this error " 2018-01-31 16:39:12 617e8835 [app] [I] Failed to save: Host has already been taken "

Do I need to have different hostnames for each provisioning profile ?

Thank you
Sai Krishna

Can you provide extensive description of your subnets (names, addresses) and then all your hosts you are trying to provision (name, subnet assignement per NIC, MAC). When scrambling addresses make sure to do this consistently so it makes sense. And also describe what you mean by provisioning profile.

Hello Izap,

Thanks for your reply.
Foreman version 1.15, Foreman Server is on Rhel 7.4 (UT Subnet )

I was successfully able to pxe boot a server from this UT vlan

So what my next goal is to provision servers in different vlan (dev, qa, prod). To start with I have followed your post and enabled qa subnet (qa-bu)

Infrastructure > smartproxies > nyrhut35(foremanprd) > services tab

Below are the details of the host (nyrhqa350) tried to provision from qa subnet (qa-bu)

Below is the error where pxe was stopped on qa host(nyrhqa350)

From foreman UI under Infrastructure > provisioning setup there is one profile for UT subnet you can see the image below…

do I need to create such profile for each different subnet qa, dev, prod ? If yes I have tried but I can’t submit prerequisites and move to network config image below

Sorry if I have missed any information you’re looking for… please let me know I can update them… Thank you again

Sai Krishna

The key thing here is “failed to fetch kickstart” error. Either token has expired (I do see expired token error on the screenshot) or your IP or MAC does not match provisioning interface. For more details about how Foreman pairs installed nodes find my blogpost at:

Token duration is by default I think 6 hours on newer Foreman versions, it was like one hour on older versions. You need to start and finish provisioning within that timeframe, or check Global setting and change that.

Second, verify that the booting host is booting from the interface you checked as provisioning one, MAC and IP address must both match.

Finally, chech DNS. Let the Anaconda to enter rescue shell and try to reach out**

I often see incorrect DNS setups leading to HOSTNOTFOUND errors during provisioning.

ps - you leaked your domain in the screenshot, if you can’t delete it contact @Gwmngilfen he can perhaps help you (the one showing Anaconda failure)

Hi Izap,

You’re correct its not able to fetch the kickstart file as IP is wrong but my dhcp file is being modified back to original. The changes I have made to add this new subnet have removed after this I have seen your post in google groups!topic/foreman-dev/9eo6Z_TAVHI

So you have suggested to turn off dhcp and dns to false in installer and rerun the installer and after doing this I don’t see dhcp option while am trying to add this new subnet as you said in this blog post

When I go to smart proxies tab I dont have options to choose dhcp and reverse DNS proxy

Can you please clarify this confusion do I need to turn off dhcp and dns to false in installer or no ?

Sai krishna

Sure, so you first need to go Smart Proxies page and there you will see set of Features. Obviously you have TFTP there, but you are missing DNS and DHCP features. Try to click on Refresh features - Foreman will contact Smart Proxy and asks for list of enabled modules. It should appear, if not then you don’t have DHCP/DNS modules enabled. Check your foreman-proxy.yaml and foreman-proxy.d directory. These files are puppet-managed so you might want to user our installer to set this up for you.

yes I have configured as you said.
I have 2 subnets in dhcp.conf but its picking the next server (foreman server) but not the newly added next server ( I don’t know where am making mistake.

I have added additional subnet details here in this file /etc/foreman-installer/custom-hiera.yaml and ran installer it came back clean by adding additional subnet in dhcp.conf file

cat /etc/foreman-installer/custom-hiera.yaml


below is the dhcp.conf file

next it failed to fetch kickstart file as before

Its not going through additionally added subnet, please help me

Sai Krishna

Every DHCP reservation made by Foreman has “next-server” entry if you are using ISC DHCP. That IP address there is grabbed from Smart Proxy API you have associated with your Subnet (as TFTP Proxy). That proxy is contacted via REST API and asked for IP address, which is configured in this config:

If that’s commented out (and Proxy API returns nothing), then IP address of Smart Proxy itself is used - reverse DNS is performed against Smart Proxy hostname (method boot_server in dhcp.rb in core).