MAAS Version: 2.5.3
I’ve run into a problem where I can’t delete a rack controller, and I’ll outline below how I was able to hack my way out of it.
I created a KVM pod on one of my nodes, composed a VM, locked it, and then installed the MAAS rack controller on it with:
$ sudo maas-rack register --url http://<ip>:5240/MAAS --secret <secret>
I found out the hard way that once you run that command, MAAS will remove that machine from the “Machines” list. And once that happens, there is no GUI option to unlock it or delete it from the rack controller list.
I also tried the command line:
$ maas $user machine unlock system_id=<id>
To fix, I followed this flow:
- Backup MAAS. I created a VM snapshot…
- Install pgAdmin4 -> https://wiki.postgresql.org/wiki/Apt
- edit /etc/postgresql/10/main/pg_hba.conf
host all all 192.168.1.0/24 md5
to the bottom, with your own subnet
service postgresql restart
- Launch pgAdmin4 server, and point to MAAS server
Login details to the MAAS postgresql database are found on MAAS: /etc/maas/regiond.conf
- Finally, execute SQL command:
UPDATE maasserver_node SET locked='false' WHERE system_id='<id>'
Now, I can delete the rack controller.