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.
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.
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
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
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
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
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 10.141.145.90 (foreman server) but not the newly added next server (10.140.96.209). 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
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).