Userdata does not have http endpoint -- only https -- breaks autoinstall of Ubuntu 22.04 LTS

I am having an issue when auto installing ubuntu 22.04 LTS.

The issue that I am experiencing is as follows.

The endpoint of http:///userdata/:(mac)/ – which should have user-data and meta-data (and vendor-data in some cases) does not return standalone – the endpoint merely redirects to https:///userdata/:(mac)/-- which does exist properly – and returns data. However, without the ability to add a cert to the grub boot, or specify redirect in autoinstall, this does not help me (unless there is a way to do this).

Excerpt from U22 PXEGrub2 Template

menuentry 'Autoinstall Ubuntu 22.04' {
   linuxefi <endpoint for jammy vmlinuz> url=<url for live iso> nomodeset root=/dev/ram0 ramdisk_size=1500000 ip=dhcp nameserver=<primary name server> nameserver=<secondary name server> autoinstall "ds=nocloud-net;s=https://<url>/userdata/<%= @host.mac %>/"
   initrdefi <endpoint for jammy initrd>

Theoretically, the only remaining work around that is seen is to inject our local certs into the live image that we are using to install. We do not want to do this so we can just roll the images to the newest LTS when available – without extra work. We do have this working in our dev environment, where both http and https endpoints return user-data/meta-data. Additionally, when the installer fails to find the endpoint in drops to manual install, in this manual install I can drop to shell and either curl -L http:// or curl -k https:// to get the user-data/meta-data.

I did see the setting Unattended URL which has description URL hosts will retrieve templates from during build, when it starts with https unattended/userdata controllers cannot be accessed via HTTP – this is set to a http value. Additionally I saw Foreman URL – which I set to http.

Do you know of a way to make the endpoint available as http?

Other than this everything seems to be working properly!

Foreman version is 2.5.2

Let me know if any clarification is needed. I know my communications skills can lack sometimes.

I think the problem here is your foreman version. It seems very old. I am running 3.5.1 and it automatically exposes the userdata stuff over http properly. I think this may be because the userdata support was added in later versions and also compatibility for Ubuntu 20.04+

1 Like