MAAS dhcp fails to parse leases written to /var/lib/maas/dhcpd.leases

Bug #1522294 reported by Mike Pontillo on 2015-12-03
6
This bug affects 1 person
Affects Status Importance Assigned to Milestone
MAAS
Critical
Mike Pontillo
1.9
Critical
Mike Pontillo
Trunk
Critical
Mike Pontillo

Bug Description

It looks like whatever format the DHCP lease file is being written in may be broken. I see the following in the log after DHCP is killed and restarts, after running MAAS for awhile.

As seen in /var/log/syslog:

Dec 2 23:25:15 maastest-1404 kernel: [22937.729185] init: maas-dhcpd main process (31355) killed by TERM signal
Dec 2 23:25:15 maastest-1404 dhcpd: /var/lib/maas/dhcp/dhcpd.leases line 182: expecting left brace.
Dec 2 23:25:15 maastest-1404 dhcpd: host 52:
Dec 2 23:25:15 maastest-1404 dhcpd: ^
Dec 2 23:25:15 maastest-1404 dhcpd: /var/lib/maas/dhcp/dhcpd.leases line 187: expecting left brace.
Dec 2 23:25:15 maastest-1404 dhcpd: host 52:
Dec 2 23:25:15 maastest-1404 dhcpd: ^
Dec 2 23:25:15 maastest-1404 dhcpd: /var/lib/maas/dhcp/dhcpd.leases line 192: expecting left brace.
Dec 2 23:25:15 maastest-1404 dhcpd: host 52:
Dec 2 23:25:15 maastest-1404 dhcpd: ^

When I check /var/lib/maas/dhcp/dhcpd.leases, there are no entries at the mentioned lines. (maybe they were automatically deleted after they were found to be invalid?)

Captured here in pastebin as well:
    http://paste.ubuntu.com/13639794/

Related branches

Blake Rouse (blake-rouse) wrote :

MAAS currently does not touch the dhcpd.leases file to write to it. We only read the file at the moment. Now that will change in MAAS 2.0, but currently this issue has nothing to do with MAAS.

Changed in maas:
status: New → Invalid
Mike Pontillo (mpontillo) wrote :

This is an ISC dhcpd bug (omshell accepts leases that cannot be parsed when read back out of the config), but MAAS needs to work around this. Reopening. We need to fix this before 1.9.0 ships.

Changed in maas:
status: Invalid → Triaged
importance: Undecided → Critical
Blake Rouse (blake-rouse) wrote :

MAAS needs to use the MAC address as a key but instead of keeping ":" in the MAC address it should convert them to "-".

description: updated
To post a comment you must log in.
This report contains Public information  Edit
Everyone can see this information.

Other bug subscribers