Unable to unlock rack controller

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>

403 Forbidden

To fix, I followed this flow:

  1. Backup MAAS. I created a VM snapshot…
  2. Install pgAdmin4 -> https://wiki.postgresql.org/wiki/Apt
  3. edit /etc/postgresql/10/main/pg_hba.conf
    Add: host all all 192.168.1.0/24 md5
    to the bottom, with your own subnet
  4. service postgresql restart
  5. Launch pgAdmin4 server, and point to MAAS server
    Login details to the MAAS postgresql database are found on MAAS: /etc/maas/regiond.conf
  6. Finally, execute SQL command:
    UPDATE maasserver_node SET locked='false' WHERE system_id='<id>'

Now, I can delete the rack controller.

I can confirm this still happens on version 3.1.0 and the executing the SQL command fixed the problem.

Thanks nateybobo for your fix.

1 Like

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