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?

(https://bugs.launchpad.net/maas/+bug/1779970) 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!