[2.0a3] dhcpd is configured incorrectly when two subnets are incorrectly placed in the same VLAN

Bug #1559327 reported by Andres Rodriguez
6
This bug affects 1 person
Affects Status Importance Assigned to Milestone
MAAS
Fix Released
Critical
Blake Rouse

Bug Description

Rakc controller subnets:

eth0 - fabric-1 - 192.168.10.0/24
eth1 - fabric-0 - 192.168.20.0/24
eth2 - fabric-2 - random subnet

This is what I did:

1. Provide DHCP on fabric-1, DHCP configured correctly for eth0.
2. Moved Rack Controller eth0 from Fabric-1 to Fabric-0.
3. Provide DHCP on fabric-0, DHCP configured correctly for eth0
4. Upgrade to alpha3 -> DHCP configured correctly
5. Delete Fabric-1 -> DHCP Configured correctly
6. Restart maas-rackd -> DHCP configured incorrectly, against eth2

10: eth0: <BROADCAST,MULTICAST,UP,LOWER_UP> mtu 1500 qdisc pfifo_fast state UP group default qlen 1000
    link/ether 00:16:3e:11:c8:87 brd ff:ff:ff:ff:ff:ff
    inet 192.168.10.27/24 brd 192.168.10.255 scope global eth0
       valid_lft forever preferred_lft forever
    inet6 fe80::216:3eff:fe11:c887/64 scope link
       valid_lft forever preferred_lft forever
12: eth1: <BROADCAST,MULTICAST,UP,LOWER_UP> mtu 1500 qdisc pfifo_fast state UP group default qlen 1000
    link/ether fc:cf:fc:cf:fc:0b brd ff:ff:ff:ff:ff:ff
    inet 192.168.20.104/24 brd 192.168.20.255 scope global eth1
       valid_lft forever preferred_lft forever
    inet6 fe80::fecf:fcff:fecf:fc0b/64 scope link
       valid_lft forever preferred_lft forever
14: eth2: <BROADCAST,MULTICAST,UP,LOWER_UP> mtu 1500 qdisc pfifo_fast state UP group default qlen 1000
    link/ether fc:cf:fc:cf:fc:0c brd ff:ff:ff:ff:ff:ff
    inet 10.216.160.107/16 brd 10.216.255.255 scope global eth2
       valid_lft forever preferred_lft forever
    inet6 fe80::fecf:fcff:fecf:fc0c/64 scope link
       valid_lft forever preferred_lft forever

dhcpd 13376 0.0 0.1 25072 11184 ? Ss 05:56 0:00 dhcpd -user dhcpd -group dhcpd -f -q -4 -pf /run/maas/dhcp/dhcpd.pid -cf /var/lib/maas/dhcpd.conf -lf /var/lib/maas/dhcp/dhcpd.leases eth2

Related branches

Changed in maas:
milestone: none → 2.0.0
importance: Undecided → Critical
status: New → Confirmed
Revision history for this message
Andres Rodriguez (andreserl) wrote :
description: updated
Revision history for this message
Andres Rodriguez (andreserl) wrote :

I installed alpha3 fresh installed.

Rack Controller interfaces results in:

eth0 Physical fabric-1 192.168.10.27 (Static assign)
eth1 Physical fabric-2 192.168.20.104 (Static assign)
eth2 Physical fabric-0 10.216.160.107 (Static assign)

So:

1. Provide DHCP on fabric-1, untagged VLAN (for the only subnet there, which is 192.168.10.0/24)

dhcpd 27638 0.0 0.1 25068 11188 ? Ss 06:31 0:00 dhcpd -user dhcpd -group dhcpd -f -q -4 -pf /run/maas/dhcp/dhcpd.pid -cf /var/lib/maas/dhcpd.conf -lf /var/lib/maas/dhcp/dhcpd.leases eth0

2. Change Rack Controller eth0's from fabric-1 to fabric-0. (DHCP automatically went down)

3. Provide DHCP on fabric-0 for 192.168.10.0/24 subnet. (DHCP is incorreclty configured)

dhcpd 27916 0.0 0.1 25072 11188 ? Ss 06:33 0:00 dhcpd -user dhcpd -group dhcpd -f -q -4 -pf /run/maas/dhcp/dhcpd.pid -cf /var/lib/maas/dhcpd.conf -lf /var/lib/maas/dhcp/dhcpd.leases eth2

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

So after further digging, we confirmed that the behavior is correct, overall, however, when it is picking the "best" interface for the VLAN, it is actually not picking the best one. In this cause, it could have picked eth0 instead of eth2, because eth0 has the subnet for which we have a dynamic range for.

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

To work around, I tried to do the following:

Move eth2 to a different fabric, fabric-1, and the result is now:

dhcpd 4376 0.0 0.1 25072 11188 ? Ss 07:25 0:00 dhcpd -user dhcpd -group dhcpd -f -q -4 -pf /run/maas/dhcp/dhcpd.pid -cf /var/lib/maas/dhcpd.conf -lf /var/lib/maas/dhcp/dhcpd.leases eth0 eth2

This should obviously not be the case... since now eth2 is connected to a different fabric than eth0

summary: - [2.0a3] after upgrade to pre-alpha3, dhcpd is configured incorrectly
+ [2.0a3] dhcpd is configured incorrectly when two subnets are incorrectly
+ placed in the same VLAN
Gavin Panella (allenap)
Changed in maas:
status: Confirmed → Triaged
Changed in maas:
assignee: nobody → Blake Rouse (blake-rouse)
Changed in maas:
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.

Other bug subscribers

Remote bug watches

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