Merge lp:~lamont/maas/bug-1553665 into lp:~maas-committers/maas/trunk

Proposed by LaMont Jones
Status: Merged
Merged at revision: 4924
Proposed branch: lp:~lamont/maas/bug-1553665
Merge into: lp:~maas-committers/maas/trunk
Diff against target: 47 lines (+6/-2)
3 files modified
src/maasserver/dhcp.py (+2/-2)
src/provisioningserver/templates/dhcp/dhcpd.conf.template (+2/-0)
src/provisioningserver/templates/dhcp/dhcpd6.conf.template (+2/-0)
To merge this branch: bzr merge lp:~lamont/maas/bug-1553665
Reviewer Review Type Date Requested Status
Mike Pontillo (community) Approve
Review via email: mp+291704@code.launchpad.net

Commit message

Addresses that are not used anymore should not remain in the DNS. Reduce the default lease time to make that happen faster.

Description of the change

Adjust the default lease time so that things fall out of the DNS once they are not in use any more.

To post a comment you must log in.
Revision history for this message
Mike Pontillo (mpontillo) wrote :

Looks good to me.

My only concern about this branch is whether or not 3 minutes is enough. I don't know if I trust PXE/EFI environments to follow DHCP standards fully and renew their leases at the appropriate times.

But I suppose we'll find out. ;-) Just something to consider, in case you want to make it maybe 5-10 minutes.

review: Approve
Revision history for this message
Andres Rodriguez (andreserl) wrote :

Yeah I agree with Mike here. I'd prefer 5 or even 10 minute lease. What we
need to ensure is that juju doesn't continue to use IP's from the dynamic
range.

On Wednesday, April 13, 2016, Mike Pontillo <email address hidden>
wrote:

> Review: Approve
>
> Looks good to me.
>
> My only concern about this branch is whether or not 3 minutes is enough. I
> don't know if I trust PXE/EFI environments to follow DHCP standards fully
> and renew their leases at the appropriate times.
>
> But I suppose we'll find out. ;-) Just something to consider, in case you
> want to make it maybe 5-10 minutes.
> --
> https://code.launchpad.net/~lamont/maas/bug-1553665/+merge/291704
> You are subscribed to branch lp:maas.
>

--
Andres Rodriguez (RoAkSoAx)
Ubuntu Server Developer
MSc. Telecom & Networking
Systems Engineer

Preview Diff

[H/L] Next/Prev Comment, [J/K] Next/Prev File, [N/P] Next/Prev Hunk
=== modified file 'src/maasserver/dhcp.py'
--- src/maasserver/dhcp.py 2016-04-01 21:14:24 +0000
+++ src/maasserver/dhcp.py 2016-04-13 16:57:23 +0000
@@ -572,7 +572,7 @@
572 ipv6_exc = exc572 ipv6_exc = exc
573 ipv6_status = SERVICE_STATUS.DEAD573 ipv6_status = SERVICE_STATUS.DEAD
574 log.err(574 log.err(
575 "Error configuring DHCPv4 on rack controller '%s': %s" % (575 "Error configuring DHCPv6 on rack controller '%s': %s" % (
576 rack_controller.system_id, exc))576 rack_controller.system_id, exc))
577 else:577 else:
578 if len(shared_networks_v6) > 0:578 if len(shared_networks_v6) > 0:
@@ -580,7 +580,7 @@
580 else:580 else:
581 ipv6_status = SERVICE_STATUS.OFF581 ipv6_status = SERVICE_STATUS.OFF
582 log.msg(582 log.msg(
583 "Successfully configured DHCPv4 on rack controller '%s'." % (583 "Successfully configured DHCPv6 on rack controller '%s'." % (
584 rack_controller.system_id))584 rack_controller.system_id))
585585
586 # Update the status for both services so the user is always seeing the586 # Update the status for both services so the user is always seeing the
587587
=== modified file 'src/provisioningserver/templates/dhcp/dhcpd.conf.template'
--- src/provisioningserver/templates/dhcp/dhcpd.conf.template 2016-03-28 13:54:47 +0000
+++ src/provisioningserver/templates/dhcp/dhcpd.conf.template 2016-04-13 16:57:23 +0000
@@ -59,6 +59,8 @@
59 {{if dhcp_subnet.get('ntp_server')}}59 {{if dhcp_subnet.get('ntp_server')}}
60 option ntp-servers {{dhcp_subnet['ntp_server']}};60 option ntp-servers {{dhcp_subnet['ntp_server']}};
61 {{endif}}61 {{endif}}
62 default-lease-time 600;
63 max-lease-time 600;
62 #64 #
63 # Subnet DHCP snippets65 # Subnet DHCP snippets
64 #66 #
6567
=== modified file 'src/provisioningserver/templates/dhcp/dhcpd6.conf.template'
--- src/provisioningserver/templates/dhcp/dhcpd6.conf.template 2016-04-01 21:34:36 +0000
+++ src/provisioningserver/templates/dhcp/dhcpd6.conf.template 2016-04-13 16:57:23 +0000
@@ -61,6 +61,8 @@
61 {{if dhcp_subnet.get('ntp_server')}}61 {{if dhcp_subnet.get('ntp_server')}}
62 option ntp-servers {{dhcp_subnet['ntp_server']}};62 option ntp-servers {{dhcp_subnet['ntp_server']}};
63 {{endif}}63 {{endif}}
64 default-lease-time 600;
65 max-lease-time 600;
64 #66 #
65 # Subnet DHCP snippets67 # Subnet DHCP snippets
66 #68 #