Unattended installation through Smart Proxy receiving 404 error

Hi:

I am attempting to provision a machine (unattended). My setup includes the
primary Foreman server and a smart proxy that services the network that
this machine will be built on.

The provisioning template generates the PXE boot file as such

DEFAULT linux

LABEL linux
KERNEL boot/CentOS-6.6-x86_64-vmlinuz
APPEND initrd=boot/CentOS-6.6-x86_64-initrd.img ks=http://capsule.xxxxxx.net:8000/unattended/provision?token=1d528253-8884-4ca9-84d9-a3b6cd0657bf ksdevice=bootif network kssendmac
IPAPPEND 2

However on the Smart Proxy I am not able to retrieve the KS via that URL. Even if I hit the Foreman server directly I still get a 404. If I hit https://foreman/unattended/provision?hostname=HOSTNAME I can pull down the provisioning template, but that doesn't work through the smart proxy.

I have DNS and DHCP being managed by the smart proxy as well.

Thanks

Could you provide some logs? Particularly
/var/log/foreman/production.log, would be interesting to see if anything
is logged there when you hit the smart proxy, and also when hitting
Foreman directly. Also /var/log/foreman-proxy/proxy.log for the smart
proxy itself.

One thought is that tokens have a limited duration, and if it's not even
working against Foreman itself, it could have expired. Cancel the build
on the host and press Build again to regenerate it.

··· On 28/05/15 01:35, Matthew Ceroni wrote: > Hi: > > I am attempting to provision a machine (unattended). My setup includes > the primary Foreman server and a smart proxy that services the network > that this machine will be built on. > > The provisioning template generates the PXE boot file as such > > DEFAULT linux > > LABEL linux > KERNEL boot/CentOS-6.6-x86_64-vmlinuz > APPEND initrd=boot/CentOS-6.6-x86_64-initrd.img ks=http://capsule.xxxxxx.net:8000/unattended/provision?token=1d528253-8884-4ca9-84d9-a3b6cd0657bf ksdevice=bootif network kssendmac > IPAPPEND 2 > > > > However on the Smart Proxy I am not able to retrieve the KS via that URL. Even if I hit the Foreman server directly I still get a 404. If I hit https://foreman/unattended/provision?hostname=HOSTNAME I can pull down the provisioning template, but that doesn't work through the smart proxy.


Dominic Cleal
Red Hat Engineering

Hello,

> However on the Smart Proxy I am not able to retrieve the KS via that URL. Even if I hit the Foreman server directly I still get a 404. If I hit https://foreman/unattended/provision?hostname=HOSTNAME I can pull down the provisioning template, but that doesn't work through the smart proxy.
>
> I have DNS and DHCP being managed by the smart proxy as well.

looks like a bug: https://bugzilla.redhat.com/show_bug.cgi?id=1225101

Looks like your installer did not configure templates plugin.

WORKAROUND: Re-run capsule installer with --capsule-templates true or
edit /etc/foreman-proxy/setting.d/templates.yml and enable there, make
sure the URL is set properly (http not https, valid capsule FQDN and
port 8000 not 9090).

··· -- Later, Lukas #lzap Zapletal