Comment 3 for bug 1896292

Revision history for this message
Rodrigo Barbieri (rodrigo-barbieri2010) wrote :

Re-tested now but tried modifying the reserved dynamic range (therefore causing a restart and clean up for leases file), but without removing the in-use IPs from the range. The result is that the leases file doesn't get cleaned up for the in-use IPs, only for removed ones.

Digging further, found out that the cause is actually the range defined in /var/lib/maas/dhcpd.conf which is set by MaaS as the reserved dynamic range gets set, and then maas-dhcpd is restarted. DHCPD then removes the entries that are not within the defined range, causing the issue.

Considering now that both DHCPD and MaaS are doing the right thing, it doesn't seem to be a way to avoid the issue, the only alternative is to clean up those IPs left behind in MaaS so they can be reused.

The "Last seen" timestamp needs to be validated before cleaning up those IPs (perhaps doing a ping test or attempting active discovery), as if those timestamps are derived directly from the leases, then they cannot be trusted.