MAAS listens on all interfaces for DHCP

Bug #1991568 reported by Adam Vest
6
This bug affects 1 person
Affects Status Importance Assigned to Milestone
MAAS
Invalid
Medium
Unassigned

Bug Description

Hello,

MAAS appears to be binding to all interfaces for it's DHCP service:
---
root@maas:~# ss -pln|grep :67
udp UNCONN 0 0 0.0.0.0:67 0.0.0.0:* users:(("dhcpd",pid=78851,fd=9))

root@maas:~# ps fauxww|grep [7]8851
root 78851 0.0 0.1 107560 12660 ? Sl 21:28 0:00 \_ /snap/maas/23947/usr/sbin/dhcpd -f -4 -pf /var/snap/maas/common/maas/dhcp/dhcpd.pid -cf /var/snap/maas/common/maas/dhcpd.conf -lf /var/snap/maas/common/maas/dhcp/dhcpd.leases eth1

This causes some confusion (at least for me) when one "disables" DHCP on subnets, since all it does is prevent MAAS from allocating IP's itself - it doesn't thereby grant other services the ability to do so. This is in contrast to, say, MAAS-provided DNS, which listens piecemeal:
---
root@maas:~# ps fauxww|grep [7]8597
root 78597 0.0 0.5 223984 36156 ? Sl 21:28 0:00 \_ /snap/maas/23947/usr/sbin/named -c /var/snap/maas/23947/bind/named.conf -S 524288 -g

root@maas:~# ss -pln|grep :53|grep 78597
udp UNCONN 0 0 10.0.0.1:53 0.0.0.0:* users:(("named",pid=78597,fd=23))
udp UNCONN 0 0 192.168.1.89:53 0.0.0.0:* users:(("named",pid=78597,fd=19))
udp UNCONN 0 0 127.0.0.1:53 0.0.0.0:* users:(("named",pid=78597,fd=15))
tcp LISTEN 0 10 10.0.0.1:53 0.0.0.0:* users:(("named",pid=78597,fd=25),("named",pid=78597,fd=24))
tcp LISTEN 0 10 192.168.1.89:53 0.0.0.0:* users:(("named",pid=78597,fd=22),("named",pid=78597,fd=21))
tcp LISTEN 0 10 127.0.0.1:53 0.0.0.0:* users:(("named",pid=78597,fd=18),("named",pid=78597,fd=17))

I believe this bug is similar in spirit to [1594317](https://bugs.launchpad.net/maas/+bug/1594317), where there is discussion to modify the bind config to allow other DNS services to exist. I believe that DHCP should similarly only bind to those subnets/interfaces where it's actually enabled on, rather than all interfaces always. This would allow MAAS to coexist with other services that may be running and wish to control DHCP for other subnets that MAAS need not be aware of or have control over.

Thank you!

Software versions:
root@maas:~# snap list
Name Version Rev Tracking Publisher Notes
charmcraft 2.0.0 1033 latest/stable canonical✓ classic
core18 20220831 2566 latest/stable canonical✓ base
core20 20220826 1623 latest/stable canonical✓ base
juju 2.9.34 20510 2.9/stable canonical✓ classic
lxd 5.6-794016a 23680 latest/stable canonical✓ -
maas 3.2.6-12016-g.19812b4da 23947 3.2/stable canonical✓ -
maas-cli 0.6.8 79 latest/stable canonical✓ -
maas-test-db 12.4-24-g.8add233 105 3.2/stable canonical✓ -
snapd 2.57.2 17029 latest/stable canonical✓ snapd
root@maas:~# cat /etc/os-release
NAME="Ubuntu"
VERSION="20.04.5 LTS (Focal Fossa)"
ID=ubuntu
ID_LIKE=debian
PRETTY_NAME="Ubuntu 20.04.5 LTS"
VERSION_ID="20.04"
HOME_URL="https://www.ubuntu.com/"
SUPPORT_URL="https://help.ubuntu.com/"
BUG_REPORT_URL="https://bugs.launchpad.net/ubuntu/"
PRIVACY_POLICY_URL="https://www.ubuntu.com/legal/terms-and-policies/privacy-policy"
VERSION_CODENAME=focal
UBUNTU_CODENAME=focal

Tags: dhcp
Changed in maas:
status: New → Triaged
importance: Undecided → Medium
tags: added: dhcp
Revision history for this message
Jerzy Husakowski (jhusakowski) wrote :

Feature request moved to internal backlog for further prioritisation (int. ref. PF-4233)

Changed in maas:
status: Triaged → Invalid
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.