DHCP leases are not released at the end of commissioning and possibly enlistment

Bug #1386517 reported by Julian Edwards
16
This bug affects 2 people
Affects Status Importance Assigned to Milestone
MAAS
Fix Released
High
Julian Edwards

Bug Description

After a node finishes commissioning, an active lease is still present for the NIC on which it booted. This is also present in the web UI on the node page.

This is rather wasteful of leases if not many IPs are available.

There's two options:
 1. Add a curtin late_command to dhclient -r
 2. Force a lease expiration using Omshell.nullify_lease() when MAAS sees that it finished commissioning

#2 is probably more of a robust solution here.

Tags: dhcp

Related branches

description: updated
Changed in maas:
status: New → Triaged
importance: Undecided → High
milestone: none → next
tags: added: dhcp
Revision history for this message
Christian Reis (kiko) wrote :

Our original plan was to issue a dhclient -r; are you concerned that crashes mid-stream will leave the lease active?

What happens if we run out of active leases? ISTR that the old behaviour was that MAAS just gave out any lease back; I guess that's something we want to avoid?

Revision history for this message
Julian Edwards (julian-edwards) wrote : Re: [Bug 1386517] Re: DHCP leases are not released at the end of commissioning and possibly enlistment

On Tuesday 28 Oct 2014 19:13:53 you wrote:
> Our original plan was to issue a dhclient -r; are you concerned that
> crashes mid-stream will leave the lease active?

Exactly that, yes.

> What happens if we run out of active leases? ISTR that the old behaviour
> was that MAAS just gave out any lease back; I guess that's something we
> want to avoid?

MAAS is not responsible for dynamic leases; it's entirely the domain of the
DHCPD. There's a bug somewhere about detecting when it runs out of lease
space but I think it will be tricky to do that until the lease parser becomes
a daemon.

So what would happen here is that the DHCPD would not offer a lease if they
were all in use, and a booting node would fail to even PXE. This will
eventually be detected by the timeout monitoring in MAAS and flag it as failed
(notwithstanding bug 1386502).

Christian Reis (kiko)
Changed in maas:
milestone: next → 1.7.1
Changed in maas:
assignee: nobody → Julian Edwards (julian-edwards)
status: Triaged → In Progress
Changed in maas:
status: In Progress → Fix Committed
Changed in maas:
status: Fix Committed → Fix Released
To post a comment you must log in.
This report contains Public information  
Everyone can see this information.

Duplicates of this bug

Other bug subscribers

Remote bug watches

Bug watches keep track of this bug in other bug trackers.