As discussed with Jacopo, I did a test on freshly deployed MAAS 3.4. I had a loop which created lxc container getting dhcp address from MAAS and immediately deleted the container.
After doing it around 100 times I could see numbers in abovce tables grow and they never go down even after leases expire.
I started another round with more containers.
maasdb=# select domain_id, count(*) from maasserver_dnsresource group by domain_id;
domain_id | count
-----------+-------
1 | 2067
(1 row)
As discussed with Jacopo, I did a test on freshly deployed MAAS 3.4. I had a loop which created lxc container getting dhcp address from MAAS and immediately deleted the container.
After doing it around 100 times I could see numbers in abovce tables grow and they never go down even after leases expire.
I started another round with more containers.
maasdb=# select domain_id, count(*) from maasserver_ dnsresource group by domain_id;
domain_id | count
-----------+-------
1 | 2067
(1 row)
maasdb=# select subnet_id, count(*) from maasserver_ staticipaddress group by subnet_id;
subnet_id | count
-----------+-------
2 | 17
6 | 6
| 6
1 | 2233
3 | 8
5 | 6
(6 rows)
This is after all containers are gone and leases expired
MAAS UI says "5 hosts; 32 resource records" which is right