isc-dhcp-server & isc-dhcp-server6 systemd service units use the same RuntimeDirectory leading to loss of pid files

Bug #1543799 reported by Graham Clinch
22
This bug affects 4 people
Affects Status Importance Assigned to Milestone
isc-dhcp (Ubuntu)
Triaged
High
Unassigned
Xenial
Triaged
High
Unassigned
Bionic
Triaged
High
Unassigned
Cosmic
Won't Fix
High
Unassigned
Disco
Won't Fix
High
Unassigned

Bug Description

dhcpd reports 'Can't create PID file /run/dhcp-server/dhcpd.pid' (or '/run/dhcp-server/dhcpd6.pid' for isc-dhcp-server6), and no file is found /run/dhcp-server.

Additionally, both isc-dhcp-server & isc-dhcp-server6 service unit files specify the RuntimeDirectory 'dhcp-server', which is removed when either unit stops (and thus would wipe out the other unit's pid file, were it being successfully written).

ProblemType: Bug
DistroRelease: Ubuntu 16.04
Package: isc-dhcp-server 4.3.3-5ubuntu4
ProcVersionSignature: Ubuntu 4.4.0-2.16-generic 4.4.0
Uname: Linux 4.4.0-2-generic x86_64
ApportVersion: 2.19.4-0ubuntu2
Architecture: amd64
Date: Tue Feb 9 21:34:08 2016
InstallationDate: Installed on 2016-02-09 (0 days ago)
InstallationMedia: Ubuntu-Server 16.04 LTS "Xenial Xerus" - Alpha amd64 (20160206)
ProcEnviron:
 LANGUAGE=en_GB:en
 TERM=linux
 PATH=(custom, no user)
 LANG=en_GB.UTF-8
 SHELL=/bin/bash
SourcePackage: isc-dhcp
UpgradeStatus: No upgrade log present (probably fresh install)
modified.conffile..etc.dhcp.dhcpd.conf: [modified]
mtime.conffile..etc.dhcp.dhcpd.conf: 2016-02-09T21:11:20.104056

Revision history for this message
Graham Clinch (g-clinch) wrote :
Changed in isc-dhcp (Ubuntu):
importance: Undecided → High
tags: added: rls-x-incoming
Revision history for this message
Graham Clinch (g-clinch) wrote :

The original primary issue (that pid files were not being written at all) was resolved in isc-dhcp 4.3.3-5ubuntu9. However both isc-dhcp-server & isc-dhcp-server6 systemd units continue to use the same RuntimeDirectory, so that when either service is restarted (eg to reconfigure), the pid file of the other service is lost.

summary: - dhcpd can't write pidfile to /run/dhcp-server (and isc-dhcp-server &
- isc-dhcp-server6 both use the same RuntimeDirectory)
+ isc-dhcp-server & isc-dhcp-server6 systemd service units use the same
+ RuntimeDirectory leading to loss of pid files
Revision history for this message
Launchpad Janitor (janitor) wrote :

Status changed to 'Confirmed' because the bug affects multiple users.

Changed in isc-dhcp (Ubuntu):
status: New → Confirmed
Revision history for this message
Fred Ubuntu (ubrntu) wrote :

Reported in februari and still not fixed in May ? No way Ubuntu gets installed in a professional environment. Fix it please!

Revision history for this message
Jason Penney (jpenney+ubuntu) wrote :

Would changing RuntimeDirectory to "dhcp-server6" in isc-dhcp-server6.service solve the issue, or is there more to it than that?

Revision history for this message
Jason Penney (jpenney+ubuntu) wrote :

Here's a patch to use a separate RuntimeDirectory. Seems to solve my issue (so far).

Revision history for this message
Jason Penney (jpenney+ubuntu) wrote :

Sorry, patch was reversed. Here's the fixed one.

Revision history for this message
Ubuntu Foundations Team Bug Bot (crichton) wrote :

The attachment "corrected patch to use separate RuntimeDirectory" seems to be a patch. If it isn't, please remove the "patch" flag from the attachment, remove the "patch" tag, and if you are a member of the ~ubuntu-reviewers, unsubscribe the team.

[This is an automated message performed by a Launchpad user owned by ~brian-murray, for any issues please contact him.]

tags: added: patch
Revision history for this message
Mathieu Trudel-Lapierre (cyphermox) wrote :

Seems like this would still apply to Eoan, marking rls-ee-tracking

tags: added: rls-ee-tracking
removed: rls-x-incoming
Changed in isc-dhcp (Ubuntu):
status: Confirmed → Triaged
Changed in isc-dhcp (Ubuntu Xenial):
status: New → Triaged
Changed in isc-dhcp (Ubuntu Bionic):
status: New → Triaged
Changed in isc-dhcp (Ubuntu Cosmic):
status: New → Triaged
Changed in isc-dhcp (Ubuntu Disco):
status: New → Triaged
Changed in isc-dhcp (Ubuntu Xenial):
importance: Undecided → High
Changed in isc-dhcp (Ubuntu Bionic):
importance: Undecided → High
Changed in isc-dhcp (Ubuntu Cosmic):
importance: Undecided → Critical
importance: Critical → High
Changed in isc-dhcp (Ubuntu Disco):
importance: Undecided → High
tags: added: id-5cdaf962074a7f2d10cef7b9
tags: added: rls-ee-notfixing
removed: rls-ee-tracking
Revision history for this message
Mathieu Trudel-Lapierre (cyphermox) wrote :

After consideration, we're not going to prioritize fixing this for the EE release (in other words, the Canonical Foundations time isn't going to be actively working on fixing this). It doesn't mean the bug won't be fixed, just that there is no company work assigned to the bug.

For now, there's a patch attached, it looks pretty good to me; but I think it would be best to have that added to Debian first (so it lands in both Debian and Ubuntu).

Please see https://wiki.ubuntu.com/Debian/Bugs for more info on how you can submit the patch to Debian (it would be nice if you could do it, that way you would get credited for it too).

Steve Langasek (vorlon)
Changed in isc-dhcp (Ubuntu Cosmic):
status: Triaged → Won't Fix
Changed in isc-dhcp (Ubuntu Disco):
status: Triaged → Won't Fix
Revision history for this message
Binh Trinh (beango) wrote :

any chance of merging the trivial patch ?

Revision history for this message
Binh Trinh (beango) wrote :

this bug still applies in jammy

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.