Problem:
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
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)?
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.