Also (sorry) there is a typo in the SQL commands above. That should be:
sudo maas-region-admin dbshell
delete from maasserver_staticipaddress ip
where ip.id in (
select ip.id from maasserver_staticipaddress ip
left outer join maasserver_interface_ip_addresses iip
on ip.id = iip.staticipaddress_id where iip.id is null and ip.alloc_type=1
);
Also (sorry) there is a typo in the SQL commands above. That should be:
sudo maas-region-admin dbshell staticipaddress ip staticipaddress ip interface_ ip_addresses iip ress_id
where iip.id is null and ip.alloc_type=1
delete from maasserver_
where ip.id in (
select ip.id from maasserver_
left outer join maasserver_
on ip.id = iip.staticipadd
);