TFTP smart proxy and templates

I am trying to provision a bare metal host and things are not working as I
would expect.

According to Tftp - Smart Proxy - Foreman these
steps should occur when the build button is clicked:

This is a rough outline of the steps triggered on the TFTP smart proxy host
when you click on the "Build" link for a host.

  1. Call mkdir -p /var/lib/tftpboot/pxelinux.cfg if it does not already
    exist.
  2. Create a host-specific TFTP configuration file in
    /var/lib/tftpboot/pxelinux.cfg/01-XX-XX-XX-XX-XX-XX, named based off of
    the MAC address, using the associated PXE template.
  3. Call mkdir -p /var/lib/tftpboot/boot if it does not already exist.
  4. Download the OS specific kernel and initrd files using wget.
    1. The download URLs are derived from the installation media path,
      and OS specific log (see app/models/redhat.rb and debian.rb in
      foreman for examples of the gory details).
    2. The debian.rb file tries to guess if you want Ubuntu or Debian,
      based on the Name you give to your OS in the UI. If the name does not
      contain 'ubuntu' or 'debian', it may default to debian, hence fail to fetch
      the kernel/initrd.
  5. The exact wget command is

wget --no-check-certificate -nv -c <src> -O "<destination>"

  1. At this point, the TFTP state is ready for the installation process.
  2. Once the host has completed installation, the OS specific
    installation script should inform foreman by retrieving the built URL.
  3. The host-specific TFTP configuration file is deleted.
  4. The kernel and initrd are not deleted, but left in place for future
    installs of the same OS and architecture combination. Please note that in
    the unlikely case that these files are modified, the simplistic freshness
    check of wget will likely get confused, corrupting the downloaded versions
    of the files. If this happens, you should simply delete the files and let
    them be re-downloaded from scratch.

However, this does not appear to be happening. If I look on the tftp
server, /var/lib/tftpboot/pxelinux.cfg does exist and is owned by
foreman-proxy. However the host-specific TFTP configuration file (#2 above)
is not created. I have looked in both the foreman and foreman-proxy log
files and can't find anything that looks wrong (no errors).

In the foreman UI, I can see that the templates are associated with the
host correctly.

I've probably got something configured incorrectly, but I have no idea what.

Suggestions?

Thanks,

– Greg

Check your TFTP proxy is associated with the Subnet in the Subnet edit
page - if it's not, Foreman won't try to manage TFTP for hosts created
on that network.

Greg