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)
Fix Released
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

Benjamin Drung (bdrung)
Changed in isc-dhcp (Ubuntu):
status: Triaged → Fix Committed
Revision history for this message
Launchpad Janitor (janitor) wrote :
Download full text (3.7 KiB)

This bug was fixed in the package isc-dhcp - 4.4.3-P1-4ubuntu1

---------------
isc-dhcp (4.4.3-P1-4ubuntu1) noble; urgency=medium

  * Merge from Debian unstable, remaining changes:
    - Ubuntu patches:
      + Give-an-example-for-subnet-mask-in-dhcpd.conf.patch
      + dhclient-fix-backoff
      + revert-next-server
      + multi-ip-addr-per-if
      + dhclient-safer-timeout
      + onetry_retry_after_initial_success
      + Add InfiniBand support:
        - dhcp-lpf-ib.patch
        - dhcp-improved-xid.patch
        - dhcp-gpxe-cid.patch
        - dhcp-improved-xid-correct-byte-order.patch
      + dhcp-4.2.4-dhclient-options-changed.patch
      + ubuntu-dhcpd-conf.patch
      + dhclient-write-pidfile-earlier.patch: Write pidfile before informing
        parent of success.
      + bind-outdated-config.guess.patch: run autoreconf in the bind directory.
    - Drop isc-dhcp-server/new_auth_behavior question from high to medium
    - Apport hook for isc-dhcp-client and isc-dhcp-server.
    - Add enforcing AppArmor profile for DHCP client and server
    - Increase the timeout to 300 seconds for dhclient.conf (following the
      default added by dhclient-safer-timeout).
    - Separate default file for isc-dhcp-relay6.
    - Create user/group dhcpd and make isc-dhcp-server depend on adduser.
    - Create /etc/dhcp/ddns-keys/ for DDNS updates.
    - Sanitize environment in dhclient-script.linux.
    - Add systemd units for -server and -relay.
      + If /etc/ltsp/dhcpd.conf exists, use that instead of
        /etc/dhcp/dhcpd.conf.
    - isc-dhcp-server: Suggest policycoreutils instead of recommending it.
    - ipv6: wait for duplicate address detection to finish. LP #1633479
    - Ship dhcp exit hook to push DNS information to resolved. LP #1889068
    - Stop building the udeb on request.
    - debian/rules: Build with -O2 instead on -O3 on ppc64el
    - debian/rules: build with -fno-strict-aliasing.
    - Disable make_resolv_conf() if systemd-resolved is in use.
    - debian/control: add Pre-Depends: ${misc:Pre-Depends} for
      init-system-helpers.
    - debian/apparmor/sbin.dhclient: Allow disabling dhclient hooks.
    - Do not build with DH_VERBOSE=1
  * Dropped changes, included in Debian:
    - Ship keama, the KEA Migration Assistant in a new isc-dhcp-keama binary
      package. (LP: #2020086)
  * Refresh patches (using gbp pq)
  * debian/control: Drop libcap-dev build dependency (no change in diffoscope).
  * Use /run/dhcp-server6 for isc-dhcp-server6 service.
    Thanks to Jason Penney (LP: #1543799)
  * debian/rfc3442-classless-routes.linux: Use configured metric.
    Thanks to Tom Carroll (LP: #1664352)
  * autopkgtest: Use setup logic from isc-dhcp-server.service

isc-dhcp (4.4.3-P1-4) unstable; urgency=low

  [ Athos Ribeiro ]
  * d/p/adjust-keama-tests.patch: do not rely on endianess (Closes: #1054077)

isc-dhcp (4.4.3-P1-3) unstable; urgency=low

  [ Athos Ribeiro ]
  * Ship keama in a new isc-dhcp-keama binary package (Closes: #1036277)
  * Add DEP8 tests for keama
  * d/p/adjust-keama-tests.patch: adjust keama tests
  * d/rules: make keama tests fail on error messages

  [ Santiago Ruano Rincón ]
  * Make dhclient-script exits wi...

Read more...

Changed in isc-dhcp (Ubuntu):
status: Fix Committed → Fix Released
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.