DHCP services stopped working

MAAS 2.9.2 (snap). Was working ok until memory and disk got exhausted. I fixed those problems but after rebooting the DHCP services are not starting.

~$ sudo maas status
bind9                            RUNNING   pid 1138, uptime 0:11:56
dhcpd                            STOPPED   Not started
dhcpd6                           STOPPED   Not started
http                             RUNNING   pid 1443, uptime 0:11:39
ntp                              RUNNING   pid 1256, uptime 0:11:52
proxy                            RUNNING   pid 1418, uptime 0:11:41
rackd                            RUNNING   pid 1141, uptime 0:11:56
regiond                          RUNNING   pid 1142, uptime 0:11:56
syslog                           RUNNING   pid 1258, uptime 0:11:52

Any suggestions please?

Hi @routergod, do you happen to see anything erroneous in /var/snap/maas/common/log/maas.log relating to dhcp? Or perhaps in /var/snap/maas/common/log/rackd.log?

1 Like

Thanks @cgrabowski. Not got my head around snaps yet, now I know where the logs are :slight_smile:

There is nothing in either maas.log or rackd.log, but regiond.log has this message;

2021-06-09 08:58:43 maasserver.rack_controller: [critical] Failed configuring DHCP on rack controller 'id:1'.
          File "/snap/maas/12555/lib/python3.8/site-packages/maasserver/dhcp.py", line 864, in configure_dhcp
            config = yield deferToDatabase(get_dhcp_configuration, rack_controller)
          File "/snap/maas/12555/lib/python3.8/site-packages/maasserver/dhcp.py", line 783, in get_dhcp_configuration
            config = get_dhcp_configure_for(
          File "/snap/maas/12555/lib/python3.8/site-packages/maasserver/dhcp.py", line 663, in get_dhcp_configure_for
          File "/snap/maas/12555/lib/python3.8/site-packages/maasserver/dhcp.py", line 444, in make_subnet_config
          File "/snap/maas/12555/lib/python3.8/site-packages/maasserver/dhcp.py", line 447, in <listcomp>

Some kind of config corruption perhaps due to memory and disk issues I had? Its a lab setup, I can rebuild it but wonder if there is a way to recover from here?

@routergod, did you ever figure this one out?

I’ve got this issue after renaming my DNS domain “maas” to “maas.mycompany.org”.

(For safety, I re-created a DNS domain “maas” with just a single host A-entry for my maas server (so that previously installed clients still find their configured proxy server).

After a full restart of my maas server, everything seemed to work fine. But a few minutes later, I realized, that DHCP isn’t working any more. Same result of sudo maas status as from routergod

My current maas version is:
maas 3.2.7-12037-g.c688dd446

When I take a look into the subnets, I realized that my typical LAN subnet appears at the wrong fabric: my fabric-LAN doesn’t contain any subnets any more, but my fabric-DMZ contains my DMZ subnets + my LAN subnet. Fabric-DMZ is configured for No DHCP, while Fabric-LAN’s DHCP setting is MAAS-provided.

After opening my LAN Subnet (attention: it took several seconds or minutes to open/load the page!), I was able to edit my LAN Subnet and re-asssign to my Fabric-LAN.

Et voilà: DHCP server is again running and working :slight_smile:

EDIT: The maas logs didn’t contain any useful information for DHCP server.

root@maas:/var/snap/maas/common/log# grep -i "dhcp" /var/snap/maas/common/log/maas.log
root@maas:/var/snap/maas/common/log# grep -i "dhcp" /var/snap/maas/common/log/rackd.log
2023-03-22 10:53:03 provisioningserver.rackdservices.dhcp_probe_service: [info] Probe for external DHCP servers started on interfaces: eth0, eth1.
2023-03-22 10:53:23 provisioningserver.rackdservices.dhcp_probe_service: [info] External DHCP probe complete.
2023-03-22 11:02:53 provisioningserver.rackdservices.dhcp_probe_service: [info] Probe for external DHCP servers started on interfaces: eth0, eth1.
2023-03-22 11:03:13 provisioningserver.rackdservices.dhcp_probe_service: [info] External DHCP probe complete.