Merge lp:~blake-rouse/maas/fix-1521618 into lp:~maas-committers/maas/trunk

Proposed by Blake Rouse
Status: Merged
Approved by: Blake Rouse
Approved revision: no longer in the source branch.
Merged at revision: 5018
Proposed branch: lp:~blake-rouse/maas/fix-1521618
Merge into: lp:~maas-committers/maas/trunk
Diff against target: 32 lines (+9/-6)
1 file modified
src/provisioningserver/templates/dhcp/dhcpd.conf.template (+9/-6)
To merge this branch: bzr merge lp:~blake-rouse/maas/fix-1521618
Reviewer Review Type Date Requested Status
Blake Rouse (community) Approve
Review via email: mp+294553@code.launchpad.net

Commit message

Move class PXE to global in dhcpd.conf.template.

Description of the change

I have QA'd this by testing that PXE booting still works and that the gateway_ip is not sent from the other subnet. This does resolve the bug.

To post a comment you must log in.
Revision history for this message
Blake Rouse (blake-rouse) wrote :

Self-approving as it just changes its location and I fully QA'd this.

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

I was just gonna ask about this. So if we have multiple dynamic ranges or
multiple subnets with dynamic ranges in the same vlan, would this just work?

On Thursday, May 12, 2016, Blake Rouse <email address hidden> wrote:

> Blake Rouse has proposed merging lp:~blake-rouse/maas/fix-1521618 into
> lp:maas.
>
> Commit message:
> Move class PXE to global in dhcpd.conf.template.
>
> Requested reviews:
> MAAS Maintainers (maas-maintainers)
> Related bugs:
> Bug #1521618 in MAAS: "wrong subnet in DHCP answer when multiple
> networks are present"
> https://bugs.launchpad.net/maas/+bug/1521618
>
> For more details, see:
> https://code.launchpad.net/~blake-rouse/maas/fix-1521618/+merge/294553
>
> I have QA'd this by testing that PXE booting still works and that the
> gateway_ip is not sent from the other subnet. This does resolve the bug.
> --
> You are subscribed to branch lp:maas.
>

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

Revision history for this message
Blake Rouse (blake-rouse) wrote :

Yes it works. The other scopes pull from their parent scope.

Preview Diff

[H/L] Next/Prev Comment, [J/K] Next/Prev File, [N/P] Next/Prev Hunk
1=== modified file 'src/provisioningserver/templates/dhcp/dhcpd.conf.template'
2--- src/provisioningserver/templates/dhcp/dhcpd.conf.template 2016-04-13 17:21:33 +0000
3+++ src/provisioningserver/templates/dhcp/dhcpd.conf.template 2016-05-12 19:06:03 +0000
4@@ -22,6 +22,15 @@
5 {{bootloader}}
6
7 #
8+# Shorter lease time for PXE booting
9+#
10+class "PXE" {
11+ match if substring (option vendor-class-identifier, 0, 3) = "PXE";
12+ default-lease-time 30;
13+ max-lease-time 30;
14+}
15+
16+#
17 # Failover Peers
18 #
19 {{for failover_peer in failover_peers}}
20@@ -72,12 +81,6 @@
21 {{dhcp_snippet['value']}}
22 {{endfor}}
23
24- class "PXE" {
25- match if substring (option vendor-class-identifier, 0, 3) = "PXE";
26- default-lease-time 30;
27- max-lease-time 30;
28- }
29-
30 {{for pool in dhcp_subnet['pools']}}
31 pool {
32 {{if pool.get('failover_peer')}}