Error prevents adding machines to MAAS - 'no datasource found'

A strange error message appeared while I was attempting to add a new machine to MAAS. The PXE boot starts normally and it does seemingly boot in the correct network. However, the machine doesn’t get added and an error message like this appears on the machine I’m trying to add:

While searching around, I found out that this used to be a problem with older versions of MAAS, where the machine being added didn’t have a connection with both the rack and the controller. Could this be caused by something similar?

( A link to an older conversation about the error, from a user running the 2.3 version of MAAS. I should note that unlike the original poster here, I haven’t added any rack controllers in different networks or anything similar.

For the record, my server is running the 2.7 version of MAAS. I was planning to upgrade to 2.8 after figuring out this error, but of course I don’t mind upgrading sooner if that might help in solving the problem.

Thank you in advance to anyone who wants to try solving this!

As an update, I upgraded to 2.8 and the problem persists. Any help would still be welcomed!

Am having the same problem. Randomly machines get stuck and can not find datasource when doing the first boot for commissioning.
Repeating the step a few times and all machines finally can continue provisioning. Why is this happening?

How can I debug this more? Is it DNS that is not working from MAAS?

MAAS version: **2.9.0~rc1 (9117-g.ae6569d91)

Do you know what was a root cause? I have the same problem.

Are you able to login after the failure? if its the same problem i am having it seems curtin is not writing the maas datasource to /etc/cloud/cloud.cfg.d/ files.

Restarting maas-regiond fixed this for me