$ nmcli con show connection1 | grep ntp
DHCP4.OPTION[30]: requested_ntp_servers = 1
DHCP4.OPTION[31]: ntp_servers = 80.50.231.226 217.96.29.26 212.160.106.226
2. timesyncd is using hardcoded default NTP server:
$ systemctl -n 200 status systemd-timesyncd.service
* 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 Sat 2017-04-22 13:12:23 CEST; 16min ago
Docs: man:systemd-timesyncd.service(8)
Main PID: 576 (systemd-timesyn)
Status: "Synchronized to time server 91.189.89.199:123 (ntp.ubuntu.com)."
Tasks: 2 (limit: 4915)
Memory: 1.5M
CPU: 20ms
CGroup: /system.slice/systemd-timesyncd.service
`-576 /lib/systemd/systemd-timesyncd
Apr 22 13:12:23 slodki systemd[1]: Starting Network Time Synchronization...
Apr 22 13:12:23 slodki systemd[1]: Started Network Time Synchronization.
Apr 22 13:12:53 slodki systemd-timesyncd[576]: Synchronized to time server 91.189.89.199:123 (ntp.ubuntu.com).
3. There are not other time sync deamons installed:
$ cat /lib/systemd/system/systemd-timesyncd.service.d/disable-with-time-daemon.conf
[Unit]
# don't run timesyncd if we have another NTP daemon installed
ConditionFileIsExecutable=!/usr/sbin/ntpd
ConditionFileIsExecutable=!/usr/sbin/openntpd
ConditionFileIsExecutable=!/usr/sbin/chronyd
ConditionFileIsExecutable=!/usr/sbin/VBoxService
$ ls -l /usr/sbin/{ntpd,openntpd,chronyd,VBoxService}
ls: cannot access '/usr/sbin/ntpd': No such file or directory
ls: cannot access '/usr/sbin/openntpd': No such file or directory
ls: cannot access '/usr/sbin/chronyd': No such file or directory
ls: cannot access '/usr/sbin/VBoxService': No such file or directory
4. There is only one default timesyncd.conf file with default values:
$ cat /etc/systemd/timesyncd.conf
# This file is part of systemd.
#
# systemd is free software; you can redistribute it and/or modify it
# under the terms of the GNU Lesser General Public License as published by
# the Free Software Foundation; either version 2.1 of the License, or
# (at your option) any later version.
#
# Entries in this file show the compile time defaults.
# You can change settings by editing this file.
# Defaults can be restored by simply deleting this file.
#
# See timesyncd.conf(5) for details.
[Time]
#NTP=
#FallbackNTP=ntp.ubuntu.com
5. DHCP hook installed as /etc/dhcp/dhclient-exit-hooks.d/timesyncd is not working, TIMESYNCD_CONF=/run/systemd/timesyncd.conf.d/01-dhclient.conf is not created.
6. After manually executing steps from hook all works as expected:
$ sudo mkdir -p /run/systemd/timesyncd.conf.d/
$ sudo cat <<EOF >/run/systemd/timesyncd.conf.d/01-dhclient.conf
> [Time]
> NTP=80.50.231.226 217.96.29.26 212.160.106.226
> EOF
$ sudo systemctl try-restart systemd-timesyncd.service
$ sudo systemctl status systemd-timesyncd.service
* 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 Sat 2017-04-22 13:47:28 CEST; 2min 6s ago
Docs: man:systemd-timesyncd.service(8)
Main PID: 3094 (systemd-timesyn)
Status: "Synchronized to time server 80.50.231.226:123 (80.50.231.226)."
Tasks: 2 (limit: 4915)
Memory: 764.0K
CPU: 19ms
CGroup: /system.slice/systemd-timesyncd.service
`-3094 /lib/systemd/systemd-timesyncd
Apr 22 13:47:27 slodki systemd[1]: Starting Network Time Synchronization...
Apr 22 13:47:28 slodki systemd[1]: Started Network Time Synchronization.
Apr 22 13:47:28 slodki systemd-timesyncd[3094]: Synchronized to time server 80.50.231.226:123 (80.50.231.226).
So ook is not triggered and NTP servers configuration not passed from DHCP/NM to timesyncd.
Kubuntu zesty amd64, systemd 232-21ubuntu3, network-manager 1.4.4-1ubuntu3
I think it's regression for https:/ /bugs.launchpad .net/ubuntu/ +source/ systemd/ +bug/1578663 in zesty.
1. NTP servers are send via DHCP and seen by NM:
$ nmcli con show connection1 | grep ntp ntp_servers = 1
DHCP4.OPTION[30]: requested_
DHCP4.OPTION[31]: ntp_servers = 80.50.231.226 217.96.29.26 212.160.106.226
2. timesyncd is using hardcoded default NTP server:
$ systemctl -n 200 status systemd- timesyncd. service timesyncd. service - Network Time Synchronization system/ systemd- timesyncd. service; enabled; vendor preset: enabled) system/ systemd- timesyncd. service. d
`-disable- with-time- daemon. conf timesyncd. service( 8) slice/systemd- timesyncd. service systemd- timesyncd
* systemd-
Loaded: loaded (/lib/systemd/
Drop-In: /lib/systemd/
Active: active (running) since Sat 2017-04-22 13:12:23 CEST; 16min ago
Docs: man:systemd-
Main PID: 576 (systemd-timesyn)
Status: "Synchronized to time server 91.189.89.199:123 (ntp.ubuntu.com)."
Tasks: 2 (limit: 4915)
Memory: 1.5M
CPU: 20ms
CGroup: /system.
`-576 /lib/systemd/
Apr 22 13:12:23 slodki systemd[1]: Starting Network Time Synchronization... timesyncd[ 576]: Synchronized to time server 91.189.89.199:123 (ntp.ubuntu.com).
Apr 22 13:12:23 slodki systemd[1]: Started Network Time Synchronization.
Apr 22 13:12:53 slodki systemd-
3. There are not other time sync deamons installed:
$ cat /lib/systemd/ system/ systemd- timesyncd. service. d/disable- with-time- daemon. conf Executable= !/usr/sbin/ ntpd Executable= !/usr/sbin/ openntpd Executable= !/usr/sbin/ chronyd Executable= !/usr/sbin/ VBoxService
[Unit]
# don't run timesyncd if we have another NTP daemon installed
ConditionFileIs
ConditionFileIs
ConditionFileIs
ConditionFileIs
$ ls -l /usr/sbin/ {ntpd,openntpd, chronyd, VBoxService} openntpd' : No such file or directory chronyd' : No such file or directory VBoxService' : No such file or directory
ls: cannot access '/usr/sbin/ntpd': No such file or directory
ls: cannot access '/usr/sbin/
ls: cannot access '/usr/sbin/
ls: cannot access '/usr/sbin/
4. There is only one default timesyncd.conf file with default values:
$ sudo find / -iname \*timesync\* timesyncd. conf system/ sysinit. target. wants/systemd- timesyncd. service dhclient- exit-hooks. d/timesyncd man/man5/ timesyncd. conf.d. 5.gz man/man5/ timesyncd. conf.5. gz man/man8/ systemd- timesyncd. 8.gz man/man8/ systemd- timesyncd. service. 8.gz private- d029f63116924e9 9b9fc44caf622e2 99-systemd- timesyncd. service- 6NwdRT systemd- timesyncd system/ systemd- timesyncd. service system/ systemd- timesyncd. service. d systemd- private- d029f63116924e9 9b9fc44caf622e2 99-systemd- timesyncd. service- jz0q47
/etc/systemd/
/etc/systemd/
/etc/dhcp/
/usr/share/
/usr/share/
/usr/share/
/usr/share/
/tmp/systemd-
/lib/systemd/
/lib/systemd/
/lib/systemd/
/var/tmp/
$ cat /etc/systemd/ timesyncd. conf
# This file is part of systemd.
#
# systemd is free software; you can redistribute it and/or modify it
# under the terms of the GNU Lesser General Public License as published by
# the Free Software Foundation; either version 2.1 of the License, or
# (at your option) any later version.
#
# Entries in this file show the compile time defaults.
# You can change settings by editing this file.
# Defaults can be restored by simply deleting this file.
#
# See timesyncd.conf(5) for details.
[Time] ntp.ubuntu. com
#NTP=
#FallbackNTP=
5. DHCP hook installed as /etc/dhcp/ dhclient- exit-hooks. d/timesyncd is not working, TIMESYNCD_ CONF=/run/ systemd/ timesyncd. conf.d/ 01-dhclient. conf is not created.
6. After manually executing steps from hook all works as expected:
$ sudo mkdir -p /run/systemd/ timesyncd. conf.d/ timesyncd. conf.d/ 01-dhclient. conf timesyncd. service timesyncd. service timesyncd. service - Network Time Synchronization system/ systemd- timesyncd. service; enabled; vendor preset: enabled) system/ systemd- timesyncd. service. d
`-disable- with-time- daemon. conf timesyncd. service( 8) slice/systemd- timesyncd. service systemd- timesyncd
$ sudo cat <<EOF >/run/systemd/
> [Time]
> NTP=80.50.231.226 217.96.29.26 212.160.106.226
> EOF
$ sudo systemctl try-restart systemd-
$ sudo systemctl status systemd-
* systemd-
Loaded: loaded (/lib/systemd/
Drop-In: /lib/systemd/
Active: active (running) since Sat 2017-04-22 13:47:28 CEST; 2min 6s ago
Docs: man:systemd-
Main PID: 3094 (systemd-timesyn)
Status: "Synchronized to time server 80.50.231.226:123 (80.50.231.226)."
Tasks: 2 (limit: 4915)
Memory: 764.0K
CPU: 19ms
CGroup: /system.
`-3094 /lib/systemd/
Apr 22 13:47:27 slodki systemd[1]: Starting Network Time Synchronization... timesyncd[ 3094]: Synchronized to time server 80.50.231.226:123 (80.50.231.226).
Apr 22 13:47:28 slodki systemd[1]: Started Network Time Synchronization.
Apr 22 13:47:28 slodki systemd-
So ook is not triggered and NTP servers configuration not passed from DHCP/NM to timesyncd.
Kubuntu zesty amd64, systemd 232-21ubuntu3, network-manager 1.4.4-1ubuntu3