Kickstart (foreman_url) and dedicated provisioning lan

Hi,

I'm installing a new foreman server but i'm facing an issue i don't know
how to solve. Here is my set up :

A foreman server with two eth cards. One is in a dedicated provisioning LAN
(non routed) and the other in a range that can be accessed from anywhere.
Lets presume that the first eth0 (no routed) has the 10.0.0.1 IP and the
eth1 (on which the web interface is available) is 172.10.0.1 and has a dns
entry called foreman.srv.local

On the same server i configured a local httpd repo to deploy the OSes
(Centos,RHEL) bind on the eth0 interface.

To configure foreman i use the following command :

foreman-installer
–enable-foreman-proxy
–foreman-proxy-tftp=true
–foreman-proxy-tftp-servername=10.0.0.1
–foreman-proxy-dhcp=true
–foreman-proxy-dhcp-interface=eth0
–foreman-proxy-dhcp-gateway=
–foreman-proxy-dhcp-range="10.0.0.2 10.0.0.100"
–foreman-proxy-dhcp-nameservers="172.10.0.1"
–foreman-proxy-dns=false
–foreman-proxy-foreman-base-url=https://foreman.srv.local
–foreman-proxy-oauth-consumer-key=XXXXXXXXXXXXXXXXXX
–foreman-proxy-oauth-consumer-secret=AZZZZZZZZZZZZ

And then in the web interface i created two subnets:

LAN : 172.10.0.0/24 | Domains: srv.local
provisioning : 10.0.0.0/24 with no Domains

When i create a new host, i put an interface in the "LAN" subnet (Primary)
and the other one in the "provisioning" subnet with managed and Provision
checkboxes checked.

When i boot the host, it boots with pxe and receives its bootloader. The
after a few seconds, it complains that it cannot retrieve the kickstart
file. It is normal because it tries to retrieve the file from
http://foreman.srv.local:80/provision… instead of
http://10.0.0.1:80/provision
"foreman.srv.local" is the ip where the web interface is binded but it
cannot be reached from the provisioning lan. In the PXE template the url is
built with foreman_url(provision) but in my case it can't work.

What should i do to solve that ?

Thx

Try setting the Unattended URL setting in the Foreman UI to the IP rather
than the name. You need to rebuild the tftp for the host so that the pxe
file is rewritten.

My problem is partly solved. Changing that setting has changed the
kickstart URL but foreman doesn't provide the kickstart file on that IP.

The kickstart file is reachable at http://foreman.srv.local:80/provision
not http://10.0.0.1:80/provision… Foreman only serves the webpages/files
on one IP (the one on which the web admin page is available) not on the
provisioning one.

··· On Monday, January 25, 2016 at 4:04:03 PM UTC+1, Greg Sutcliffe wrote:

Try setting the Unattended URL setting in the Foreman UI to the IP rather
than the name. You need to rebuild the tftp for the host so that the pxe
file is rewritten.

As far as I recall, the default configuration should be to bind Apache to
all IPs - can you check your Apache config?

Greg

··· On 26 January 2016 at 15:31, Teoman Onay wrote:

My problem is partly solved. Changing that setting has changed the
kickstart URL but foreman doesn’t provide the kickstart file on that IP.

The kickstart file is reachable at http://foreman.srv.local:80/provision
not http://10.0.0.1:80/provision… Foreman only serves the
webpages/files on one IP (the one on which the web admin page is available)
not on the provisioning one.