[Bug 1578663] Re: create DHCP exit hook for setting NTP servers through dhclient

Launchpad Bug Tracker 1578663 at bugs.launchpad.net
Mon May 23 06:58:42 UTC 2016

This bug was fixed in the package systemd - 229-4ubuntu6

systemd (229-4ubuntu6) xenial-proposed; urgency=medium

  * Add a DHCP exit hook for pushing received NTP servers into timesyncd.
    (LP: #1578663)
  * Revert "enable TasksMax= for all services by default, and set it to 512".
    Introducing a default limit on number of threads broke a lot of software
    which regularly needs more, such as MySQL and RabbitMQ, or services that
    spawn off an indefinite number of subtasks that are not in a scope, like
    LXC or cron. 512 is way too much for most "simple" services, and it's way
    too little for the ones mentioned above. Effective (and much stricter)
    limits should instead be put into units individually.
    (Closes: #823530, LP: #1578080)
  * debian/gbp.conf: Switch to ubuntu-xenial branch.

 -- Martin Pitt <martin.pitt at ubuntu.com>  Thu, 12 May 2016 10:39:30

** Changed in: systemd (Ubuntu Xenial)
       Status: Fix Committed => Fix Released

You received this bug notification because you are a member of Ubuntu
Foundations Bugs, which is subscribed to systemd in Ubuntu.

  create DHCP exit hook for setting NTP servers through dhclient

Status in systemd package in Ubuntu:
  Fix Released
Status in systemd source package in Xenial:
  Fix Released
Status in systemd source package in Yakkety:
  Fix Released

Bug description:
  Similar to /etc/dhcp/dhclient-exit-hooks.d/ntpdate, we should ship a
  DHCP exit hook for timesyncd to update the timesyncd configuration in
  /run/systemd/timesyncd.conf.d/01-dhclient.conf to set the picked up
  NTP servers, and restart timesyncd.

  Rationale: This is a regression compared to trusty where we used ntpdate; /etc/dhcp/dhclient-exit-hooks.d/ntpdate ran ntpdate on the new NTP servers. This causes timesyncd to always try and talk to the disto configured server (ntp.ubuntu.com) which might be disallowed by firewall rules or other networking policy. Thus machines in such an environment never get a correct time sync even when they get a local NTP server advertised over DHCP (unless they use systemd-networkd, which is not done by default in Xenial).

  Test case:
  - Set up a DHCP server that includes NTP information. For example, you can set LXC_DHCP_CONFILE=/etc/lxc/dnsmasq.conf in /etc/default/lxc-net, and create /etc/lxc/dnsmasq.conf with "dhcp-option=option:ntp-server,", restart lxc-net, and then run QEMU on lxcbr0 instead of the builtin network.
  - In the client machine, disconnect and reconnect the network (e. g. "sudo ifdown ens3; sudo ifup ens3").
  - Check in "systemctl status systemd-timesyncd" that timesyncd tries to sync with the given NTP server (for the bogus it will fail, but the point is that it did try).

  Regression potential: A broken dhclient-exit-hooks.d has the potential
  to break subsequent hooks. dhclient-scripts runs the hooks without
  "set -e", but syntax errors can still cause damage. Thus it should be
  verified that later hooks (e. g. /etc/dhcp/dhclient-exit-hooks.d
  /zzz_avahi-autoipd) still run. Beyond that there is little potential
  for regression as

To manage notifications about this bug go to:

More information about the foundations-bugs mailing list