[2.0a1] After upgrade form 1.10, dhcpd is enabled on wrong interface

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

Bug Description

dhcpd.conf can be found in: http://paste.ubuntu.com/15270493/
dhcpd-interfaces has virbr2 instead of virbr0

#syslog:

Mar 2 17:57:10 unleashed maas.service_monitor: [INFO] Service 'maas-dhcpd' has been started and is 'running'.
Mar 2 17:57:10 unleashed dhcpd[31420]: Wrote 0 class decls to leases file.
Mar 2 17:57:10 unleashed dhcpd[31420]: Wrote 0 deleted host decls to leases file.
Mar 2 17:57:10 unleashed dhcpd[31420]: Wrote 0 new dynamic host decls to leases file.
Mar 2 17:57:10 unleashed dhcpd[31420]: Wrote 1 leases to leases file.
Mar 2 17:57:10 unleashed dhcpd[31420]:
Mar 2 17:57:10 unleashed dhcpd[31420]: No subnet declaration for virbr2 (192.168.133.1).
Mar 2 17:57:10 unleashed dhcpd[31420]: ** Ignoring requests on virbr2. If this is not what
Mar 2 17:57:10 unleashed dhcpd[31420]: you want, please write a subnet declaration
Mar 2 17:57:10 unleashed dhcpd[31420]: in your dhcpd.conf file for the network segment
Mar 2 17:57:10 unleashed dhcpd[31420]: to which interface virbr2 is attached. **
Mar 2 17:57:10 unleashed dhcpd[31420]:
Mar 2 17:57:10 unleashed dhcpd[31420]:
Mar 2 17:57:10 unleashed dhcpd[31420]: Not configured to listen on any interfaces!
Mar 2 17:57:10 unleashed dhcpd[31420]:
Mar 2 17:57:10 unleashed dhcpd[31420]: If you think you have received this message due to a bug rather
Mar 2 17:57:10 unleashed dhcpd[31420]: than a configuration issue please read the section on submitting
Mar 2 17:57:10 unleashed dhcpd[31420]: bugs on either our web page at www.isc.org or in the README file
Mar 2 17:57:10 unleashed dhcpd[31420]: before submitting a bug. These pages explain the proper
Mar 2 17:57:10 unleashed dhcpd[31420]: process and the information we find helpful for debugging..
Mar 2 17:57:10 unleashed dhcpd[31420]:
Mar 2 17:57:10 unleashed dhcpd[31420]: exiting.

[...]

roaksoax@unleashed:/etc/apt/sources.list.d⟫ sudo service maas-dhcpd status
● maas-dhcpd.service - MAAS instance of ISC DHCP server for IPv4
   Loaded: loaded (/lib/systemd/system/maas-dhcpd.service; enabled; vendor preset: enabled)
   Active: failed (Result: exit-code) since Wed 2016-03-02 17:59:50 EST; 1min 7s ago
     Docs: man:dhcpd(8)
  Process: 2006 ExecStart=/bin/sh -ec INTERFACES=$(cat /var/lib/maas/dhcpd-interfaces); LEASES_FILE=/var/lib/maas/dhcp/dhcpd.leases;
  Process: 2002 ExecStartPre=/bin/chown root:root /var/lib/maas/dhcp (code=exited, status=0/SUCCESS)
  Process: 1998 ExecStartPre=/bin/mkdir -p /var/lib/maas/dhcp (code=exited, status=0/SUCCESS)
  Process: 1993 ExecStartPre=/bin/chown root:root /run/maas/dhcp (code=exited, status=0/SUCCESS)
  Process: 1988 ExecStartPre=/bin/mkdir -p /run/maas/dhcp (code=exited, status=0/SUCCESS)
 Main PID: 2006 (code=exited, status=1/FAILURE)

Mar 02 17:59:49 unleashed systemd[1]: Starting MAAS instance of ISC DHCP server for IPv4...
Mar 02 17:59:49 unleashed systemd[1]: Started MAAS instance of ISC DHCP server for IPv4.
Mar 02 17:59:49 unleashed dhcpd[2006]: Wrote 0 class decls to leases file.
Mar 02 17:59:49 unleashed dhcpd[2006]: Wrote 0 deleted host decls to leases file.
Mar 02 17:59:49 unleashed dhcpd[2006]: Wrote 0 new dynamic host decls to leases file.
Mar 02 17:59:49 unleashed dhcpd[2006]: Wrote 1 leases to leases file.
Mar 02 17:59:50 unleashed systemd[1]: maas-dhcpd.service: Main process exited, code=exited, status=1/FAILURE
Mar 02 17:59:50 unleashed systemd[1]: maas-dhcpd.service: Unit entered failed state.
Mar 02 17:59:50 unleashed systemd[1]: maas-dhcpd.service: Failed with result 'exit-code'.

Related branches

description: updated
Changed in maas:
importance: Undecided → Critical
summary: - [2.0a1] After upgrade form 1.10, dhcpd is
+ [2.0a1] After upgrade form 1.10, dhcpd is enabled on wrong interface
description: updated
Revision history for this message
Andres Rodriguez (andreserl) wrote :

interfaces read of rack controller: http://paste.ubuntu.com/15270528/

Revision history for this message
Andres Rodriguez (andreserl) wrote :
Changed in maas:
milestone: none → 2.0.0
Revision history for this message
Andres Rodriguez (andreserl) wrote :

Ok, so I tried a different thing.

1. Installed fresh MAAS on my same systems
2. Configured DHCP for an untagged VLAN, that was providing DHCP for subent 192.168.122.0/24.
3. dhcpd.conf -> http://paste.ubuntu.com/15271300/
4. dhcpd-interfaces -> http://paste.ubuntu.com/15271302/

If you see 4, dhcpd-interfaces has the incorrect interface. This bug is present on both fresh installs and upgrades.

Changed in maas:
assignee: nobody → Blake Rouse (blake-rouse)
Revision history for this message
Andres Rodriguez (andreserl) wrote :

So I looked into the code and into the get_interfaces_with_ip_on_vlan and I see that this is wrong. I put a logger function to show what interfaces were being returned for that particular VLAN, and I found this:

Mar 2 21:06:45 unleashed maas.dhcp: [WARNING] ##### Interfaces with ip on VLAN: fabric-3.untagged Interfaces: name=virbr1, type=physical, mac=52:54:00:c2:29:bb
Mar 2 21:06:45 unleashed maas.dhcp: [WARNING] ##### Interfaces with ip on VLAN: fabric-3.untagged Interfaces: name=virbr0, type=physical, mac=52:54:00:d3:1a:ac
Mar 2 21:06:45 unleashed maas.dhcp: [WARNING] ##### Interfaces with ip on VLAN: fabric-3.untagged Interfaces: name=virbr2, type=physical, mac=52:54:00:df:e7:1c
Mar 2 21:06:45 unleashed maas.dhcp: [WARNING] ##### Interfaces with ip on VLAN: fabric-3.untagged Interfaces: name=lxcbr0, type=physical, mac=92:35:cf:fd:2e:8b
Mar 2 21:06:45 unleashed maas.dhcp: [WARNING] ##### Interfaces with ip on VLAN: fabric-3.untagged Interfaces: name=wlan0, type=physical, mac=7c:7a:91:40:48:4f
Mar 2 21:06:45 unleashed maas.dhcp: [WARNING] ##### Interfaces with ip on VLAN: fabric-3.untagged Interfaces: name=eth0, type=physical, mac=28:d2:44:65:25:55

In reality, it is returning all interfaces on all VLAN's, even though it should only be returning interfaces on fabric-3.untagged VLAN, which in reality is only 1. virbr0. In this case, it seems to be incorrectly "finding" multiple interfaces on fabric-3.untagged. That being said, however, it seems to later on have just picked virbr1 as it was the first one.

Changed in maas:
status: New → Fix Committed
status: Fix Committed → 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.