Comment 4 for bug 1639332

Revision history for this message
Andres Rodriguez (andreserl) wrote : Re: Expire the DHCP lease after commissioning or make the default-lease-time configurable

@Bert, I think there may be a confusion on the MAAS behavior. In MAAS 2.0+, the machine in a subnet has a "dynamic" range. This "Dynamic" range is use /only/ for enlistment and commissioning purposes (and for any other machine that you need to get an IP, without you caring what IP that machine has).

When you deploy a machine, MAAS will pick any machine /outside/ the dynamic range and in the rest of the "available" network. That means that the dynamic range will always be available for the randomness that may occur on your network, but the rest of the subnet is used for the deployed machines.

What you are seeing is correct behavior. What happens is the machine enlists and commissions with a random IP from the /dynamic/ range, and a DNS record is created for that process. However, when you deploy a machine the IP the machine gets is outside of the /dynamic/ range and the DNS record gets updated to reflect that. For example:

192.168.10.0/MAAS

1. 192.168.10.1 -> GW
2. 192.168.10.2 - 192.168.10.102 -> dynamic range
3. 192.168.10.103 - 192.168.10.254 -> rest of the network.

So a machine will commission with an IP inside of (2), a DNS record will be created. When you deploy the machine, MAAS will automatically pick an IP from (3) and update the record if present.

Now, that said, keep in mind that the lease time inside the dynamic range is less than 10 minutes. So for example:

a. enlist/commissioning machine
b. maas creates DNS record for IP inside (2)
c. 10 minutes later, isc-dhcp tells MAAS the lease expired
d. MAAS clears the DNS record

Hope this helps clarify the usage.