DHCP exit hook for setting systemd-timesyncd NTP servers doesn't work
Affects | Status | Importance | Assigned to | Milestone | |
---|---|---|---|---|---|
network-manager (Ubuntu) |
Confirmed
|
Undecided
|
Dimitri John Ledkov | ||
systemd (Debian) |
Fix Released
|
Unknown
|
|||
systemd (Ubuntu) |
Won't Fix
|
Low
|
Unassigned |
Bug Description
I think it's regression for https:/
1. NTP servers are send via DHCP and seen by NM:
$ nmcli con show connection1 | grep ntp
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-
* 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...
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/
[Unit]
# don't run timesyncd if we have another NTP daemon installed
ConditionFileIs
ConditionFileIs
ConditionFileIs
ConditionFileIs
$ ls -l /usr/sbin/
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\*
/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/
# 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=
5. DHCP hook installed as /etc/dhcp/
6. After manually executing steps from hook all works as expected:
$ sudo mkdir -p /run/systemd/
$ 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...
Apr 22 13:47:28 slodki systemd[1]: Started Network Time Synchronization.
Apr 22 13:47:28 slodki systemd-
So hook 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
description: | updated |
Changed in systemd (Ubuntu): | |
assignee: | nobody → Balint Reczey (rbalint) |
tags: | added: rls-aa-incoming |
Changed in systemd (Ubuntu): | |
status: | New → In Progress |
summary: |
- DHCP exit hook for setting NTP servers doesn't work + DHCP exit hook for setting systemd-timesyncd NTP servers doesn't work |
Changed in systemd (Debian): | |
status: | Unknown → New |
Changed in systemd (Debian): | |
status: | New → Fix Released |
Changed in systemd (Debian): | |
status: | Fix Released → New |
Changed in systemd (Ubuntu): | |
importance: | Undecided → Medium |
Changed in systemd (Ubuntu): | |
assignee: | Balint Reczey (rbalint) → nobody |
importance: | Medium → Low |
tags: | removed: rls-aa-incoming |
Changed in systemd (Debian): | |
status: | New → Fix Released |
I tried reproducing the issue, but without NM it worked.
Seems to be LP: #293139, but I dig further and test in a VM with NM.