Cloud-init fails to fetch MAAS datasource from metadata_url missing port

Hey everyone!

I spent some time trying to setup a MAAS server using the Ansible playbook. While the playbook works great (kudos!), I ran into an interesting issue when trying to use an external DHCP server.

I know that this is not necessarily a supported configuration nonetheless I got my nodes to PXE boot. Only once cloud-init kicks in, I am seeing an error (see screenshot attached). Basically saying it can’t reach the meta-data/instance-id endpoint. The problem here is that the port number seems to be missing. When querying the endpoint on my machine and adding port number 5248 I get the expected answer.

Checking the http://10.8.8.31:5248/MAAS/metadata/latest/enlist-preseed/?op=get_enlist_preseed endpoint the metadata_url value is also missing the port.

datasource:
  MAAS:
    metadata_url: http://10.8.8.31/MAAS/metadata/

But http://10.8.8.31:5240/MAAS/metadata/latest/enlist-preseed/?op=get_enlist_preseed returns the correct metadata url.

datasource:
  MAAS:
    metadata_url: http://10.8.8.31:5240/MAAS/metadata/

It seems roughly related to a bug #1982315 that should have been resolved in version 3.3.0 when using external DNS. So maybe the root cause is not external DHCP but rather the external DNS? Do you have any tips and pointers how to further troubleshoot this or resolve it?

Also found another user having similar issues.

Thanks for your help!


MAAS Release: 3.3.4-13189-g.f88272d1e
Install Method: Snap
DHCP: External
Device: UEFI Bare Metal

First:

After the first error in cloud-init there a two more subsequent ones:

Hi @tomtom2770 , thanks for the detailed explanation and debugging.
Could you please file a bug with this info so that we can more easily track the issue?

Thanks

Thanks @ack, I created bug report 2025722.

1 Like

Seems to be a duplicate of bug report 2022926.

1 Like

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