[xenial] systemctl hangs when stopping isc-dhcp-server
Affects | Status | Importance | Assigned to | Milestone | |
---|---|---|---|---|---|
isc-dhcp (Ubuntu) |
Confirmed
|
Undecided
|
Unassigned |
Bug Description
This affects both 4.3.3-5ubuntu8 that exists in xenial right now and 4.3.3-5ubuntu9 which I just uploaded to fix another bug.
With the move to systemd service file, 'sudo systemctl stop isc-dhcp-
[Unit]
Description=ISC DHCP IPv4 server
Documentation=
Wants=network-
After=network-
After=time-
ConditionPathEx
ConditionPathEx
ConditionPathEx
[Service]
EnvironmentFile
RuntimeDirector
# The leases files need to be root:dhcpd even when dropping privileges
ExecStart=/bin/sh -ec '\
CONFIG_
if [ -f /etc/ltsp/
[ -e /var/lib/
chown root:dhcpd /var/lib/dhcp /var/lib/
chmod 775 /var/lib/dhcp ; chmod 664 /var/lib/
exec dhcpd -user dhcpd -group dhcpd -f -4 -pf /run/dhcp-
[Install]
WantedBy=
Eg:
$ sudo systemctl stop isc-dhcp-
<hangs>
wait long enough and systemd will KILL it. In the logs:
Mar 1 10:58:14 sec-xenial-amd64 systemd[1]: isc-dhcp-
Mar 1 10:58:14 sec-xenial-amd64 systemd[1]: isc-dhcp-
Mar 1 10:58:14 sec-xenial-amd64 systemd[1]: isc-dhcp-
Mar 1 10:58:14 sec-xenial-amd64 systemd[1]: isc-dhcp-
Things I tried to resolve it, none of which worked:
* add Type=forking
* add Type=forking and remove '-f' from the dhcpd exec
* adjust /run/dhcp-server to be root:root and 755
* adjust /run/dhcp-server to be dhcpd:dhcpd and 755 (this was in 4.3.3-5ubuntu8 but fails to create a pid file and was fixed in 4.3.3-5ubuntu9)
* adjust /run/dhcp-server to be root:dhcpd and 775
* add Type=forking and remove '-f' from the dhcpd exec and use KillSignal=SIGINT (see https:/
This bug is not related to AppArmor. With 4.3.3-5ubuntu9 this bug persists and there are no apparmor denials. Furthermore, if I disable the apparmor profile, the bug persists.
Possibly related: https:/ /bugs.launchpad .net/ubuntu/ +source/ isc-dhcp/ +bug/1551351/ comments/ 6.