Public bug reported:
When installing dual stack IPv4 and IPv6 DHCP I found that DHCPv4 and
DHCPv6 clobber each others /run/dhcp-server path when you stop or
restart one of the daemons
I found that the config in the systemd unit has the /run path set to the
same location for both DHCPv4 and DHCPv6
In /lib/systemd/system/isc-dhcp-server.service the offending line that
conflicts is:
exec dhcpd -user dhcpd -group dhcpd -f -4 -pf /run/dhcp-server/dhcpd.pid -cf
$CONFIG_FILE $INTERFACES'
In /lib/systemd/system/isc-dhcp-server6.service the offending line that
conflicts is:
exec dhcpd -user dhcpd -group dhcpd -f -6 -pf /run/dhcp-server/dhcpd6.pid -cf
$CONFIG_FILE $INTERFACES'
This means if you stop/restart DHCPv4 or DHCPv6, then it cleans up the
path /run/dhcp-server and removed the pid file for the alternate
process.
I have found a possible fix is to give DHCPv6 it's own /run path, thus I
suggest:
1) update DHCPv6 to use /run/dhcp-server6/
Update /lib/systemd/system/isc-dhcp-server6.service to use /run/dhcp-server6/
ie.
exec dhcpd -user dhcpd -group dhcpd -f -6 -pf /run/dhcp-server6/dhcpd6.pid
-cf $CONFIG_FILE $INTERFACES'
Now we need to give dhcp access to this path in Apparmor:
2) Update /etc/apparmor.d/usr.sbin.dhcpd and add an additional line
38d39
/var/lib/dhcp/dhcpd{,6}.leases* lrw,
/var/log/ r,
/var/log/** rw,
/{,var/}run/{,dhcp-server/}dhcpd{,6}.pid rw,
+ /{,var/}run/{,dhcp-server6/}dhcpd{,6}.pid rw,
Found in package version:
4.4.1-2ubuntu5
** Affects: isc-dhcp (Ubuntu)
Importance: Undecided
Status: New
** Description changed:
When installing dual stack IPv4 and IPv6 DHCP I found that DHCPv4 and
DHCPv6 clobber each others /run/dhcp-server path when you stop or
restart one of the daemons
I found that the config in the systemd unit has the /run path set to the
same location for both DHCPv4 and DHCPv6
-
In /lib/systemd/system/isc-dhcp-server.service the offending line that
conflicts is:
- exec dhcpd -user dhcpd -group dhcpd -f -4 -pf /run/dhcp-server/dhcpd.pid
-cf $CONFIG_FILE $INTERFACES'
-
+ exec dhcpd -user dhcpd -group dhcpd -f -4 -pf /run/dhcp-server/dhcpd.pid
-cf $CONFIG_FILE $INTERFACES'
In /lib/systemd/system/isc-dhcp-server6.service the offending line that
conflicts is:
- exec dhcpd -user dhcpd -group dhcpd -f -6 -pf /run/dhcp-server/dhcpd6.pid
-cf $CONFIG_FILE $INTERFACES'
+ exec dhcpd -user dhcpd -group dhcpd -f -6 -pf /run/dhcp-server/dhcpd6.pid
-cf $CONFIG_FILE $INTERFACES'
-
- This means if you stop/restart DHCPv4 or DHCPv6, then it cleans up the path
/run/dhcp-server and removed the pid file for the alternate process.
+ This means if you stop/restart DHCPv4 or DHCPv6, then it cleans up the
+ path /run/dhcp-server and removed the pid file for the alternate
+ process.
I have found a possible fix is to give DHCPv6 it's own /run path, thus I
suggest:
1) update DHCPv6 to use /run/dhcp-server6/
Update /lib/systemd/system/isc-dhcp-server6.service to use /run/dhcp-server6/
ie.
- exec dhcpd -user dhcpd -group dhcpd -f -6 -pf /run/dhcp-server6/dhcpd6.pid
-cf $CONFIG_FILE $INTERFACES'
+ exec dhcpd -user dhcpd -group dhcpd -f -6 -pf /run/dhcp-server6/dhcpd6.pid
-cf $CONFIG_FILE $INTERFACES'
Now we need to give dhcp access to this path in Apparmor:
2) Update /etc/apparmor.d/usr.sbin.dhcpd and add an additional line
38d39
- /var/lib/dhcp/dhcpd{,6}.leases* lrw,
- /var/log/ r,
- /var/log/** rw,
- /{,var/}run/{,dhcp-server/}dhcpd{,6}.pid rw,
+ /var/lib/dhcp/dhcpd{,6}.leases* lrw,
+ /var/log/ r,
+ /var/log/** rw,
+ /{,var/}run/{,dhcp-server/}dhcpd{,6}.pid rw,
+ /{,var/}run/{,dhcp-server6/}dhcpd{,6}.pid rw,
+
+ Found in package version:
+ 4.4.1-2ubuntu5
--
You received this bug notification because you are a member of Ubuntu
Bugs, which is subscribed to Ubuntu.
https://bugs.launchpad.net/bugs/1882317
Title:
Dual Stack DHCP clobber each other when using /run/dhcp-server/ for
pid files
To manage notifications about this bug go to:
https://bugs.launchpad.net/ubuntu/+source/isc-dhcp/+bug/1882317/+subscriptions
--
ubuntu-bugs mailing list
[email protected]
https://lists.ubuntu.com/mailman/listinfo/ubuntu-bugs