Comment 3 for bug 1898122

Revision history for this message
Igor Gnip (igorgnip) wrote :

Yes, to cleanup accumulated 'observed' IPs:

select id,subnet_id,ip from maasserver_staticipaddress where alloc_type=6 order by ip;
delete from maasserver_dnsresource_ip_addresses where staticipaddress_id in (select id from maasserver_staticipaddress where alloc_type=6 order by ip );
delete from maasserver_interface_ip_addresses where staticipaddress_id in (select id from maasserver_staticipaddress where alloc_type=6 order by ip );
delete from maasserver_staticipaddress where alloc_type=6;

It is still not clear to me how something which was just 'observed' at some point in time maybe a year ago could prevent usage of that ip. It's just observed at some point in time. It's gone. Maas just did not unobserve it.

Un addition to the fix issued which enables deletion via cli/api (thank you), maas could allow alloc_type=6 ips to be overwritten/treated as unused or pinged from rack controller to verify the ip is still 'observed' and if not, remove it.