Nothing happens on the tftp smart-proxy when I click 'build'

Hello,

I have a foreman installation working for facts and reports and I'm trying
now to use it for provisioning.

I've installed foreman-proxy on the same host and configured the tftp
module.

I've configured the proxy in foreman and it shows up correctly (it shows up
in the smart Proxies page with the tftp feature).

The smart-proxy seems to be working, as I can create the 'default' entry
when I click on the 'Build PXE default' button in the 'Provisioning
Templates' page:

I, [2015-01-15T18:09:09.575797 #28694] INFO – : TFTP:
/tftp/pxelinux.cfg/default entry created successfully
xx.xxx.xxx.xx - - [15/Jan/2015 18:09:09] "POST /tftp/create_default
HTTP/1.1" 200 - 0.0053

But when I click 'Build' for a host, I get the confirmation dialog and a
confirmation message saying 'Enabled testnode for rebuild on next boot' but
nothing happens on the smart-proxy.
I have the following in production.log :

Started GET "/hosts/testnode.domain/setBuild" for 10.128.2.10 at 2015-01-15
18:14:27 +0100
Processing by HostsController#setBuild as HTML
Parameters: {"id"=>"testnode.domain"}
Redirected to https://foreman.domain/hosts/testnode.domain
Completed 302 Found in 38ms (ActiveRecord: 10.0ms)

Do I need to have also the dns and dhcpd proxy ?

There are no error messages or warning to indicate what could be wrong.

Cheers,
Loïc

Hi Loic,
You need dhcp but not necessarily on the foreman server. It just make
things easier. If you already have a dhcp server you can manage it with
foreman : Foreman :: Manual,
DNS can be usefull for you new host to find provisionning server.

··· 2015-01-15 18:20 GMT+01:00 Loïc Brarda :

Hello,

I have a foreman installation working for facts and reports and I’m trying
now to use it for provisioning.

I’ve installed foreman-proxy on the same host and configured the tftp
module.

I’ve configured the proxy in foreman and it shows up correctly (it shows
up in the smart Proxies page with the tftp feature).

The smart-proxy seems to be working, as I can create the ‘default’ entry
when I click on the ‘Build PXE default’ button in the ‘Provisioning
Templates’ page:

I, [2015-01-15T18:09:09.575797 #28694] INFO – : TFTP:
/tftp/pxelinux.cfg/default entry created successfully
xx.xxx.xxx.xx - - [15/Jan/2015 18:09:09] “POST /tftp/create_default
HTTP/1.1” 200 - 0.0053

But when I click ‘Build’ for a host, I get the confirmation dialog and a
confirmation message saying ‘Enabled testnode for rebuild on next boot’ but
nothing happens on the smart-proxy.
I have the following in production.log :

Started GET “/hosts/testnode.domain/setBuild” for 10.128.2.10 at
2015-01-15 18:14:27 +0100
Processing by HostsController#setBuild as HTML
Parameters: {“id”=>“testnode.domain”}
Redirected to https://foreman.domain/hosts/testnode.domain
Completed 302 Found in 38ms (ActiveRecord: 10.0ms)

Do I need to have also the dns and dhcpd proxy ?

There are no error messages or warning to indicate what could be wrong.

Cheers,
Loïc


You received this message because you are subscribed to the Google Groups
"Foreman users" group.
To unsubscribe from this group and stop receiving emails from it, send an
email to foreman-users+unsubscribe@googlegroups.com.
To post to this group, send email to foreman-users@googlegroups.com.
Visit this group at http://groups.google.com/group/foreman-users.
For more options, visit https://groups.google.com/d/optout.

Do be more precise, the question was more if foreman needs a dhcp
smart-proxy for the whole provisionning process. We already have a dhcp
server and a dns infrastructure, but I would prefer not touch them , at
least during the tests. The servers I want to install are already known by
the dns and it's easy to add them by hand in the dhcp server.

But I have no clue on what is wrong on the foreman server, as there are no
error messages.

Cheers,
Loïc

··· 2015-01-16 1:45 GMT+01:00 claude juif :

Hi Loic,
You need dhcp but not necessarily on the foreman server. It just make
things easier. If you already have a dhcp server you can manage it with
foreman : Foreman :: Manual,
DNS can be usefull for you new host to find provisionning server.

> Do be more precise, the question was more if foreman needs a dhcp
> smart-proxy for the whole provisionning process. We already have a dhcp

If you want to provision bare metal by booting from network, then yes -
you need a DHCP under Foreman control. You can perhaps setup another one
and forward or something similar.

If you can't do that, there is a foreman_bootdisk plugin which allows
you to boot from network without DHCP using CD/DVD/USB stick created
from the Foreman web interface for each host.

··· -- Later, Lukas #lzap Zapletal

You need to add option 066 and 067 to your dhcp server if it's a MS DHCP,

On isc dhcp something like this :

allow booting;
allow bootp;

option fqdn.no-client-update on; # set the "O" and "S" flag bits
option fqdn.rcode2 255;
option pxegrub code 150 = text ;

PXE Handoff.

next-server tftp-server-ip;
filename "pxelinux.0";

Regards,

··· 2015-01-16 9:49 GMT+01:00 Loïc Brarda :

2015-01-16 1:45 GMT+01:00 claude juif claude.juif@gmail.com:

Hi Loic,
You need dhcp but not necessarily on the foreman server. It just make
things easier. If you already have a dhcp server you can manage it with
foreman : Foreman :: Manual,
DNS can be usefull for you new host to find provisionning server.

Do be more precise, the question was more if foreman needs a dhcp
smart-proxy for the whole provisionning process. We already have a dhcp
server and a dns infrastructure, but I would prefer not touch them , at
least during the tests. The servers I want to install are already known by
the dns and it’s easy to add them by hand in the dhcp server.

But I have no clue on what is wrong on the foreman server, as there are no
error messages.

Cheers,
Loïc


You received this message because you are subscribed to the Google Groups
"Foreman users" group.
To unsubscribe from this group and stop receiving emails from it, send an
email to foreman-users+unsubscribe@googlegroups.com.
To post to this group, send email to foreman-users@googlegroups.com.
Visit this group at http://groups.google.com/group/foreman-users.
For more options, visit https://groups.google.com/d/optout.

To contradict Lukas (something I love to do :P), control of DHCP is
optional to the provisioning process.

With a TFTP proxy (assuming it's working right), Foreman can write a
file that directs the booting host to download the correct
initrd/kernel files for the OS you're installing, with appropriate
options to get the kickstart/preseed file from Foreman as the install
progresses.

For that to work, the host must:

(a) Boot from the network (clearly :P)
(b) Get a DHCP record containing a next-server statement (as per Claude's point)
© Be able to resolve the Foreman server from it's nameservers while installing

While have Foreman control your DHCP is clearly helpful (it'll ensure
the next-server info is present in the lease), it's not required, so
long as the above criteria are met.

To your original point, the most likely reason for a TFTP file not
getting written by the proxy is configuration. You say that Foreman
has detected the TFTP feature - that's good. Did you also edit your
Subnet and select the new TFTP proxy there?

Regards,
Greg

I had a similar issue and mine wasn't because I forgot to add a TFTP server
to the subnet (which is usually the issue). It was because the machine had
no subnet attached to it's interface for some reason even though this was
all set up in the hostgroup that it was in.

··· On Friday, January 16, 2015 at 11:55:56 AM UTC-5, Greg Sutcliffe wrote: > > To contradict Lukas (something I love to do :P), control of DHCP is > optional to the provisioning process. > > With a TFTP proxy (assuming it's working right), Foreman can write a > file that directs the booting host to download the correct > initrd/kernel files for the OS you're installing, with appropriate > options to get the kickstart/preseed file from Foreman as the install > progresses. > > For that to work, the host must: > > (a) Boot from the network (clearly :P) > (b) Get a DHCP record containing a next-server statement (as per Claude's > point) > (c) Be able to resolve the Foreman server from it's nameservers while > installing > > While have Foreman control your DHCP is clearly helpful (it'll ensure > the next-server info is present in the lease), it's not required, so > long as the above criteria are met. > > To your original point, the most likely reason for a TFTP file not > getting written by the proxy is configuration. You say that Foreman > has detected the TFTP feature - that's good. Did you also edit your > Subnet and select the new TFTP proxy there? > > Regards, > Greg >

Also check if you have unique identifiers for NICs, if not the validation
does not trigger during creation but only after it is saved (build usually).

LZ

··· On Thu, Dec 8, 2016 at 9:52 PM, Edson Manners wrote:

I had a similar issue and mine wasn’t because I forgot to add a TFTP
server to the subnet (which is usually the issue). It was because the
machine had no subnet attached to it’s interface for some reason even
though this was all set up in the hostgroup that it was in.

On Friday, January 16, 2015 at 11:55:56 AM UTC-5, Greg Sutcliffe wrote:

To contradict Lukas (something I love to do :P), control of DHCP is
optional to the provisioning process.

With a TFTP proxy (assuming it’s working right), Foreman can write a
file that directs the booting host to download the correct
initrd/kernel files for the OS you’re installing, with appropriate
options to get the kickstart/preseed file from Foreman as the install
progresses.

For that to work, the host must:

(a) Boot from the network (clearly :P)
(b) Get a DHCP record containing a next-server statement (as per Claude’s
point)
© Be able to resolve the Foreman server from it’s nameservers while
installing

While have Foreman control your DHCP is clearly helpful (it’ll ensure
the next-server info is present in the lease), it’s not required, so
long as the above criteria are met.

To your original point, the most likely reason for a TFTP file not
getting written by the proxy is configuration. You say that Foreman
has detected the TFTP feature - that’s good. Did you also edit your
Subnet and select the new TFTP proxy there?

Regards,
Greg


You received this message because you are subscribed to the Google Groups
"Foreman users" group.
To unsubscribe from this group and stop receiving emails from it, send an
email to foreman-users+unsubscribe@googlegroups.com.
To post to this group, send email to foreman-users@googlegroups.com.
Visit this group at https://groups.google.com/group/foreman-users.
For more options, visit https://groups.google.com/d/optout.


Later,
Lukas @lzap Zapletal