systemd-timesyncd unit still running after installation of ntp package

Bug #1597909 reported by Nathan Stratton Treadway
26
This bug affects 4 people
Affects Status Importance Assigned to Milestone
ntp (Ubuntu)
Fix Released
Undecided
Unassigned
Xenial
Incomplete
Undecided
Unassigned
Zesty
Incomplete
Undecided
Unassigned

Bug Description

I recently installed the ntp package on a fairly vanilla installed-from-DVD Xenial system, and noticed that after the package installation both systemd-timesyncd and ntp were running:

# systemctl status ntp systemd-timesyncd.service --no-pager
 ntp.service - LSB: Start NTP daemon
   Loaded: loaded (/etc/init.d/ntp; bad; vendor preset: enabled)
   Active: active (running) since Tue 2016-06-28 19:21:16 HDT; 6min ago
     Docs: man:systemd-sysv-generator(8)
   CGroup: /system.slice/ntp.service
           3364 /usr/sbin/ntpd -p /var/run/ntpd.pid -g -u 112:118

[...log lines...]

 systemd-timesyncd.service - Network Time Synchronization
   Loaded: loaded (/lib/systemd/system/systemd-timesyncd.service; enabled; vendor preset: enabled)
  Drop-In: /lib/systemd/system/systemd-timesyncd.service.d
           `-disable-with-time-daemon.conf
   Active: active (running) since Sun 2016-06-26 06:53:05 HDT; 2 days ago
     Docs: man:systemd-timesyncd.service(8)
 Main PID: 821 (systemd-timesyn)
   Status: "Synchronized to time server 91.189.89.199:123 (ntp.ubuntu.com)."
   CGroup: /system.slice/systemd-timesyncd.service
           821 /lib/systemd/systemd-timesyncd

[...log lines...]

I was able to do "systemctl stop systemd-timesyncd.service" manually without any trouble, but presumably if I hadn't noticed the situation I might have had problems with the two services both running simultaneously until my next reboot.

(Once the systemd-timesyncd service is stopped, it is prevented from starting again by the constraint in the disable-with-time-daemon.conf file.)

Revision history for this message
Nathan Stratton Treadway (nathanst) wrote :

Here are my current versions of the affected packages:
# dpkg -l ntp systemd | cat
Desired=Unknown/Install/Remove/Purge/Hold
| Status=Not/Inst/Conf-files/Unpacked/halF-conf/Half-inst/trig-aWait/Trig-pend
|/ Err?=(none)/Reinst-required (Status,Err: uppercase=bad)
||/ Name Version Architecture Description
+++-==============-=======================-============-=================================================
ii ntp 1:4.2.8p4+dfsg-3ubuntu5 amd64 Network Time Protocol daemon and utility programs
ii systemd 229-4ubuntu6 amd64 system and service manager

Revision history for this message
Launchpad Janitor (janitor) wrote :

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

Changed in ntp (Ubuntu):
status: New → Confirmed
Revision history for this message
David Britton (dpb) wrote :

Hi There, thanks for the bug report --

This is fixed in the Ubuntu development release: Artful. ntpd now ships a systemd job that conflicts with systemd-timesyncd.service that prevents the duplicate service running. Confirmed on a deployment of the latest Artful as of this comment.

Changed in ntp (Ubuntu):
status: Confirmed → Fix Released
Revision history for this message
Andres Rodriguez (andreserl) wrote :

FWIW, this issue is still present in older releases. Effectively, if NTP is installed and configured to access X ntp server and timesyncd would still try to fallback to ntp.ubuntu.com.

In proxied environments, this will result in ntp.ubuntu.com being unavailable.

Revision history for this message
David Britton (dpb) wrote :

@andreserl -- does this just fill up the error log on old releases or is there a functional impact?

Changed in ntp (Ubuntu Xenial):
status: New → Incomplete
Changed in ntp (Ubuntu Zesty):
status: New → Incomplete
To post a comment you must log in.
This report contains Public information  
Everyone can see this information.

Duplicates of this bug

Other bug subscribers

Remote bug watches

Bug watches keep track of this bug in other bug trackers.