Unattended install templates not found on Smart Proxy

I am trying to autoinstall Ubuntu 22.04. DHCP and PXE boot are working well. Grub2, cloud-init, and user-data templates are assigned to a host, which can netboot successfully to the ISO. But when the installer tries to download meta-data from the Smart Proxy it fails with this error in proxy.log. What can be done to troubleshoot this?

Finished GET /userdata/XX:XX:XX:XX:XX:XX/meta-data with 404

Expected outcome:
Successfull autoinstall with user-data template

Foreman and Proxy versions:
Foreman and Smart Proxy on version 3.9.1, installed on Ubuntu 20.04 LTS Server

Plugin versions:
DHCP 3.9.1
Discovery 1.0.5
HTTPBoot 3.9.1
Script 0.10.3
TFTP 3.9.1
Templates 3.9.1

Other relevant data:
Foreman IP, subnet, and are included in trusted_proxies of Foreman and Foreman-Proxy

	:enabled: true
	:template_url: http://my.foreman.server:8000
foreman-proxy settings.yml:
	:http_port: 8000
	menuentry 'autoinstall' {
	  linux /boot/ubuntu/server/jammy/vmlinuz root=/dev/rd/0 rw auto ip=dhcp BOOTIF=XX:XX:XX:XX:XX:XX ramdisk_size=1500000 fsck.mode=skip autoinstall url=http://webserver/ubuntu-22.04.3-live-server-amd64.iso "ds=nocloud-net;s=http://my.foreman.server:8000/userdata/XX:XX:XX:XX:XX:XX/" console-setup/ask_detect=false locale=en_US localechooser/translation/warn-light=true localechooser/translation/warn-severe=true hostname=host.domain.com domain=domain.com
	  initrd /boot/ubuntu/server/jammy/initrd

Hey @mallcop9000!

Foreman does not have a meta-data API endpoint and usually, that has not been causing issues in the past. The Ubuntu host just requests the meta-data API several times but proceeds with the installation after like ten attempts.

Therefore, I assume that your user-data template might be the issue here. What is the actual state of the Ubuntu host? Does it just open the language menu for the visual installer?

Can you post the rendered version of your userdata template (masquerading sensitive information)?

Also, the latest version of the template had some issues mentioned here: Bug #37011: Ubuntu 22.04.3 needs adaption user-data template - Foreman

and here:

We’re currently working on fixing those.

Regarding the missing templates over smart-proxy, the issue shouldn’t be the missing meta-data.
The difference is that the port on smart-proxies is 8000, which writes those messages in the proxy.log while the maininstance, uses port 80 and writes those messages in the http or production.log.

If you cannot get the unattended templates over smart-proxy the issue is usually, that the smart-proxy is not in the list of you trusted hosts on the main-instance. Forwarding templates to proxies is only working if that host is trusted.
There is one list for trusted-hosts in the answers.yaml of the installer but also one under Administer → Settings but I am currently not sure, which one is relevant for the unattended endpoint.

1 Like