dhcpd with multiple interfaces on 2.8b3 snap doesn't start

Bug #1877292 reported by Mark Klein
6
This bug affects 1 person
Affects Status Importance Assigned to Milestone
MAAS
Fix Released
High
Alberto Donato

Bug Description

Hello,

installed: 2.8.0~beta3-8439-g.a69fa79a1 (6308) 139MB -

I have the controller serving 2 subnets. If I enable DHCP on only one at a time things work on whichever is enabled, but if I try to enable DHCP on more than 1 interface I get something like the following error:

2020-05-07T11:07:26Z dhcpd[344577]: eno1.472 eno1.473: interface name too long (is 17)
2020-05-07T11:07:26Z dhcpd[344577]:
2020-05-07T11:07:26Z dhcpd[344577]: If you think you have received this message due to a bug rather
2020-05-07T11:07:26Z dhcpd[344577]: than a configuration issue please read the section on submitting
2020-05-07T11:07:26Z dhcpd[344577]: bugs on either our web page at www.isc.org or in the README file
2020-05-07T11:07:26Z dhcpd[344577]: before submitting a bug. These pages explain the proper
2020-05-07T11:07:26Z dhcpd[344577]: process and the information we find helpful for debugging..
2020-05-07T11:07:26Z dhcpd[344577]:
2020-05-07T11:07:26Z dhcpd[344577]: exiting.

Which looks like it's treating the dhcpd-interfaces file contents as a single string. Just to try something quick, I modified the run-dhcpd supervisord script and pointed the config to a modifiable location to remove the quotes around "$INTERFACES". Once I did that, things seem to start and work fine.

--- /snap/maas/6308/bin/run-dhcpd 2020-05-01 20:18:09.000000000 +0200
+++ /var/snap/maas/6308/bin/run-dhcpd 2020-05-07 13:17:43.899613147 +0200
@@ -23,4 +23,4 @@
 touch "$LEASES_FILE"
 "$SNAP/usr/sbin/maas-dhcp-helper" clean "$LEASES_FILE"

-exec "$SNAP/usr/sbin/dhcpd" -f -4 -pf "$DHCP_DIR/dhcpd.pid" -cf "$DHCP_CONFIG" -lf "$LEASES_FILE" "$INTERFACES"
+exec "$SNAP/usr/sbin/dhcpd" -f -4 -pf "$DHCP_DIR/dhcpd.pid" -cf "$DHCP_CONFIG" -lf "$LEASES_FILE" $INTERFACES

Cheers,
Mark

Related branches

Alberto Donato (ack)
Changed in maas:
milestone: none → 2.8.0b4
status: New → In Progress
importance: Undecided → High
assignee: nobody → Alberto Donato (ack)
Changed in maas:
status: In Progress → Fix Committed
Alberto Donato (ack)
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.