ubuntu@maas-deb35:/var/lib/maas$ sudo systemctl status maas-dhcpd
○ maas-dhcpd.service - MAAS instance of ISC DHCP server for IPv4
Loaded: loaded (/lib/systemd/system/maas-dhcpd.service; enabled; vendor preset: enabled)
Active: inactive (dead)
Condition: start condition failed at Thu 2024-03-14 09:38:18 UTC; 92ms ago
└─ ConditionPathExists=/run/maas/dhcp was not met
Docs: man:dhcpd(8)
Mar 14 09:38:14 maas-deb35 systemd[1]: Condition check resulted in MAAS instance of ISC DHCP server for IPv4 being skipped.
Mar 14 09:38:14 maas-deb35 systemd[1]: Condition check resulted in MAAS instance of ISC DHCP server for IPv4 being skipped.
Mar 14 09:38:15 maas-deb35 systemd[1]: Condition check resulted in MAAS instance of ISC DHCP server for IPv4 being skipped.
Mar 14 09:38:15 maas-deb35 systemd[1]: Condition check resulted in MAAS instance of ISC DHCP server for IPv4 being skipped.
Mar 14 09:38:16 maas-deb35 systemd[1]: Condition check resulted in MAAS instance of ISC DHCP server for IPv4 being skipped.
Mar 14 09:38:16 maas-deb35 systemd[1]: Condition check resulted in MAAS instance of ISC DHCP server for IPv4 being skipped.
Mar 14 09:38:16 maas-deb35 systemd[1]: Condition check resulted in MAAS instance of ISC DHCP server for IPv4 being skipped.
Mar 14 09:38:17 maas-deb35 systemd[1]: Condition check resulted in MAAS instance of ISC DHCP server for IPv4 being skipped.
Mar 14 09:38:17 maas-deb35 systemd[1]: Condition check resulted in MAAS instance of ISC DHCP server for IPv4 being skipped.
Mar 14 09:38:18 maas-deb35 systemd[1]: Condition check resulted in MAAS instance of ISC DHCP server for IPv4 being skipped.
(reverse-i-search)`up': sudo apt ^Cdate
ubuntu@maas-deb35:/var/lib/maas$ cat /lib/systemd/system/maas-dhcpd.service
[Unit]
Description=MAAS instance of ISC DHCP server for IPv4
Documentation=man:dhcpd(8)
Wants=network-online.target
After=network-online.target
After=time-sync.target
BindsTo=maas-rackd.service
ConditionPathExists=/run/maas/dhcp
ConditionPathExists=/var/lib/maas/dhcpd.conf
ConditionPathExists=/var/lib/maas/dhcpd-interfaces
[Service]
# Allow dhcp server to write lease and pid file as 'dhcpd' user
# The leases files need to be root:dhcpd even when dropping privileges
ExecStart=/bin/sh -ec '\
INTERFACES=$(cat /var/lib/maas/dhcpd-interfaces); \
LEASES_FILE=/var/lib/maas/dhcp/dhcpd.leases; \
[ -e $LEASES_FILE ] || touch $LEASES_FILE; \
/usr/sbin/maas-dhcp-helper clean $LEASES_FILE; \
chown root:dhcpd /var/lib/maas/dhcp $LEASES_FILE; \
chmod 775 /var/lib/maas/dhcp ; chmod 664 $LEASES_FILE; \
exec dhcpd -user dhcpd -group dhcpd -f -q -4 -pf /run/maas/dhcp/dhcpd.pid \
-cf /var/lib/maas/dhcpd.conf -lf $LEASES_FILE $INTERFACES'
# Require dhcpd stop in 8 seconds, if not kill it with 'mixed' mode.
TimeoutStopSec=8
KillMode=mixed
[Install]
WantedBy=multi-user.target
we can see that ConditionPathExists=/run/maas/dhcp was not met . This is because we create /run/maas only when we install maas and after whatever reboot /run/maas goes away and we don't recreate it anymore (bug introduced here https://github.com/maas/maas/commit/b402c32d0a85d26fd6a5ce14a72056013fd93075 as ExecStartPre=/bin/mkdir -p /run/maas/dhcp /var/lib/maas/dhcp was removed)
Looking at
ubuntu@ maas-deb35: /var/lib/ maas$ sudo systemctl status maas-dhcpd system/ maas-dhcpd. service; enabled; vendor preset: enabled) ists=/run/ maas/dhcp was not met
○ maas-dhcpd.service - MAAS instance of ISC DHCP server for IPv4
Loaded: loaded (/lib/systemd/
Active: inactive (dead)
Condition: start condition failed at Thu 2024-03-14 09:38:18 UTC; 92ms ago
└─ ConditionPathEx
Docs: man:dhcpd(8)
Mar 14 09:38:14 maas-deb35 systemd[1]: Condition check resulted in MAAS instance of ISC DHCP server for IPv4 being skipped. i-search) `up': sudo apt ^Cdate maas-deb35: /var/lib/ maas$ cat /lib/systemd/ system/ maas-dhcpd. service man:dhcpd( 8) online. target online. target sync.target maas-rackd. service ists=/run/ maas/dhcp ists=/var/ lib/maas/ dhcpd.conf ists=/var/ lib/maas/ dhcpd-interface s
Mar 14 09:38:14 maas-deb35 systemd[1]: Condition check resulted in MAAS instance of ISC DHCP server for IPv4 being skipped.
Mar 14 09:38:15 maas-deb35 systemd[1]: Condition check resulted in MAAS instance of ISC DHCP server for IPv4 being skipped.
Mar 14 09:38:15 maas-deb35 systemd[1]: Condition check resulted in MAAS instance of ISC DHCP server for IPv4 being skipped.
Mar 14 09:38:16 maas-deb35 systemd[1]: Condition check resulted in MAAS instance of ISC DHCP server for IPv4 being skipped.
Mar 14 09:38:16 maas-deb35 systemd[1]: Condition check resulted in MAAS instance of ISC DHCP server for IPv4 being skipped.
Mar 14 09:38:16 maas-deb35 systemd[1]: Condition check resulted in MAAS instance of ISC DHCP server for IPv4 being skipped.
Mar 14 09:38:17 maas-deb35 systemd[1]: Condition check resulted in MAAS instance of ISC DHCP server for IPv4 being skipped.
Mar 14 09:38:17 maas-deb35 systemd[1]: Condition check resulted in MAAS instance of ISC DHCP server for IPv4 being skipped.
Mar 14 09:38:18 maas-deb35 systemd[1]: Condition check resulted in MAAS instance of ISC DHCP server for IPv4 being skipped.
(reverse-
ubuntu@
[Unit]
Description=MAAS instance of ISC DHCP server for IPv4
Documentation=
Wants=network-
After=network-
After=time-
BindsTo=
ConditionPathEx
ConditionPathEx
ConditionPathEx
[Service] $(cat /var/lib/ maas/dhcpd- interfaces) ; \ FILE=/var/ lib/maas/ dhcp/dhcpd. leases; \ sbin/maas- dhcp-helper clean $LEASES_FILE; \ dhcp/dhcpd. pid \ maas/dhcpd. conf -lf $LEASES_FILE $INTERFACES'
# Allow dhcp server to write lease and pid file as 'dhcpd' user
# The leases files need to be root:dhcpd even when dropping privileges
ExecStart=/bin/sh -ec '\
INTERFACES=
LEASES_
[ -e $LEASES_FILE ] || touch $LEASES_FILE; \
/usr/
chown root:dhcpd /var/lib/maas/dhcp $LEASES_FILE; \
chmod 775 /var/lib/maas/dhcp ; chmod 664 $LEASES_FILE; \
exec dhcpd -user dhcpd -group dhcpd -f -q -4 -pf /run/maas/
-cf /var/lib/
# Require dhcpd stop in 8 seconds, if not kill it with 'mixed' mode.
TimeoutStopSec=8
KillMode=mixed
[Install] multi-user. target
WantedBy=
we can see that ConditionPathEx ists=/run/ maas/dhcp was not met . This is because we create /run/maas only when we install maas and after whatever reboot /run/maas goes away and we don't recreate it anymore (bug introduced here https:/ /github. com/maas/ maas/commit/ b402c32d0a85d26 fd6a5ce14a72056 013fd93075 as ExecStartPre= /bin/mkdir -p /run/maas/dhcp /var/lib/maas/dhcp was removed)