Smart proxy is showing main foreman URL in default PXElinux file


I installed Foreman (1.22) /Katello (3.12) and a smart proxy (1.22) and they seem to be talking to each other. Under smart proxy I see HTTPboot, Puppet/CA, Pulp Nodes, Logs, tftp and templates as being active features.

However, when I build the default PXE menu, the file on the smart proxy is still pointing to the main Foreman URL.

I checked that :http_port:8000 is uncommented in settings.yml.
settings.d/templates.yml has :template_url: pointing to
I also have pointed the template proxy and tftp proxy to the smart proxy in the subnet setting for the smart proxy subnet.

With this setup, the smart proxy is forwarding requests for getting the kickstart file back to the main foreman server. So when the main server is down, the smart proxy stops serving the kickstart file.

I cannot browse the kickstart file on the smart proxy at the same location like the foreman server (after changing just the hostname). But if I use the :8000 port, I can see the kickstart file.

How do I update the URL on default pxelinux.cfg file in the smart proxy to point to the smart proxy URL?

Thanks for your help!

  • PK

Hello PK and welcome to our community!

The host will use smart-proxy template proxy only and only if the Subnet the host/hostgroup is associated to has Template Proxy set. If that’s unset it will not be used.

Thank you for the reply lzap!

The subnet that the host is associated with does have the template proxy, tftp proxy and httpproxy listed as the smart proxy host. But the pxelinux.cfg/default file on the smart proxy still points to my foreman master. May be I am confused and thats how it is supposed to be? I was expecting that ks=url to be that of the smart proxy…

This is how the pxelinux.cfg/default file on the smart proxy looks like… mlppup999 is the foreman master. So if that machine is down, and I try to PXE boot a machine, it complains that the kickstart file is not available as it cannot reach the master.

Thanks once again for your time!

If you make a change in Subnet, the pxe file will not be updated. What you need to do is Rebuild configuration for existing hosts to have that rendered. For all new hosts it will be correct.

Got it! I see that if I build a new host, it does point to the smart proxy URL! Thanks for that hint!

I still have one last question - We usually build machines by displaying the traditional PXE menu (F12) and then selecting the OS, etc. We dont use the host creation method as most of our machines are new physical machines, and getting their MAC involves additional steps.

It is for this situation that I was asking if the pxelinux.cfg/default file on the smart proxy can be updated to point to the smart proxy URL so when I select an OS from the PXE menu, the KS file will actually then point to the smart proxy itself.

Thanks once again!

This is a RFE, we have an issue tracker for that. We don’t have any macro that gives smart proxy hostname yet :frowning:

Thanks for letting me know. This would be helpful, please let me know if I need to create a request for this (and how). Thanks.

From what I see in my setup, even if I do the host setup method, if the Foreman master is down (network or daemons), the smart proxy at a remote location stops working (complains that it cannot reach the master). This becomes a problem as there is always a dependency on the master although everything is/should be local to the smart proxy. Right?

Yeah, smart proxies don’t have any database, they are really quite “dumb” components which do dirty work of connecting things together.

Thanks for the info Lukas!

Now that I know this for sure, I will try to change the architecture a bit based on our requirements. I might look at putting a regular Foreman setup at all sites (instead of just the smart proxy), and have some scripts which will do some API calls to sync some of our custom provisioning templates, so that all sites are in SYNC.

Thanks again for the help,