What should be the contents of /snap/maas/current/etc/maas/preseeds/enlist?

I’m chasing some problems with adding new hosts to MaaS (as described in post 6507 on this forum) and one of the errors I ran into was, a node would PXE boot and begin enlisting but freeze after showing the error “cloud-init can not apply stage config no datasource found likely bad things to come.” Some googling gave me conflicting information about what the contents of /snap/maas/current/etc/maas/preseeds/enslist should be. Based on one post I found online (https://askubuntu.com/questions/1357662/maas-problems-with-enlisting-nodes) I should not be getting “Unrecognised signature: method=GET op=get_enlist_preseed” when I browse to [MAAS-ip]:5240/MAAS/metadata/enlist-preseed/?op=get_enlist_preseed, but that’s exactly the error I’m getting. So I checked my enlist file contents, and it simply has:

{{preseed_data}}

However, other posts are saying that the contents of this file should be something like:

#cloud-config
datasource:
  MAAS:
    timeout : 50
    max_wait : 120
    # there are no default values for metadata_url or oauth credentials
    # If no credentials are present, non-authed attempts will be made.
    metadata_url: http://<region_controller_ip>:5240/MAAS/metadata

What should the contents of this file be? Should I be getting something other than “Unrecognised signature: method=GET op=get_enlist_preseed” when I browse to the URL mentioned above?

Not sure if it will be a use for you, but this is what we use as we had many issues with the recent 3.2.x update that broke some DNS stuff and only this fixes it for us:

{{preseed_data}}

datasource:
MAAS:
metadata_url: http://x.x.x.x:5240/MAAS/metadata

Hi @dcaunt42.

The URL to the get_enlist_preseed is http://<IP>:5240/MAAS/metadata/v1/enlist-preseed/?op=get_enlist_preseed (note the v1 before enlist-preseed). There you can find the config that is passed to cloud-init by your MAAS deployment.

As for the contents of etc/maas/preseeds/enlist, it is indeed the only line that is there by default, as it is then processed by the template engine.

Hope you find that response helpful!

Thank you both for the responses. We are on 3.3 so I don’t think we were being affected by the same update as you are referring to @vgeorgiev. It looks like the issue was indeed the missing v1 from the URL. Thank you @igor-brovtsin

This topic was automatically closed 2 days after the last reply. New replies are no longer allowed.