Attempting to delete a domain from the GUI fails

I created a test domain in MAAS DNS to see if I could delegate the zone to Openstack Designate (which didn’t work by the way).
When I try delete the domain it fails with error

("Cannot delete some instances of model 'Domain' because they are referenced through a protected foreign key: 'DNSResource.domain'", <QuerySet [<DNSResource: name=record>]>)

The only way I’ve managed to get rid of it is to go into the postgresql maasdb and manually remove the rows from the maasserver_dnsresource table

It appears that even though the GUI says the records were deleted, it leaves behind protected phantom objects in the database.

Hi, this issue is being tracked here:

I’ve made a fix which should make its way into the 3.0.0 release.

1 Like