I upgraded from MAAS 2.6 and found the same problem, but I managed to find a solution for this that works in MAAS 3.0+. I tried the methods mentioned above, but they did not work for me.
When I queried this URL: http://x.x.x.2:5240/MAAS/metadata/enlist-preseed/?op=get_enlist_preseed through my browser
I got this result:
Unrecognised signature: method=GET op=get_enlist_preseed
I then installed a brand new instance of MAAS 3.3 on a test server and figured out that the "/etc/maas/preseeds/enlist" or /snap/maas/24685/etc/maas/preseeds/enlist file in my new install was completely different to my production install.
File on production server:
$ cat /etc/maas/preseeds/enlist
#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: {{metadata_enlist_url}}
output: {all: '| tee -a /var/log/cloud-init-output.log'}
File on the test server:
$ cat /etc/maas/preseeds/enlist
{{preseed_data}}
I made a backup of the old enlist file on the production server and changed it to be the same as the enlist file on my test server and now it's working again and it's enlisting new machines.
Now when I query the same URL, I get this:
#cloud-config
apt:
preserve_sources_list: false
primary:
- arches:
- amd64
- i386
uri: http://archive.ubuntu.com/ubuntu
- arches:
- default
uri: http://ports.ubuntu.com/ubuntu-ports
proxy: http://x.x.x.2:8000/
security:
- arches:
- amd64
- i386
uri: http://archive.ubuntu.com/ubuntu
- arches:
- default
uri: http://ports.ubuntu.com/ubuntu-ports
sources_list: 'deb $PRIMARY $RELEASE main restricted multiverse universe
# deb-src $PRIMARY $RELEASE main restricted multiverse universe
deb $PRIMARY $RELEASE-updates main restricted multiverse universe
# deb-src $PRIMARY $RELEASE-updates main restricted multiverse universe
deb $PRIMARY $RELEASE-backports main restricted multiverse universe
# deb-src $PRIMARY $RELEASE-backports main restricted multiverse universe
deb $SECURITY $RELEASE-security main restricted multiverse universe
# deb-src $SECURITY $RELEASE-security main restricted multiverse universe
'
datasource:
MAAS:
metadata_url: http://x.x.x.2:5240/MAAS/metadata/
manage_etc_hosts: true
packages:
- python3-yaml
- python3-oauthlib
power_state:
condition: test ! -e /tmp/block-poweroff
delay: now
mode: poweroff
timeout: 1800
rsyslog:
remotes:
maas: x.x.x.2:5247
Hope this helps.