NTP servers from DHCP are not propagated to timesyncd
Affects | Status | Importance | Assigned to | Milestone | |
---|---|---|---|---|---|
OEM Priority Project |
New
|
Critical
|
Cyrus Lien | ||
network-manager (Ubuntu) |
Confirmed
|
High
|
Heather Ellsworth | ||
Focal |
Confirmed
|
High
|
Heather Ellsworth |
Bug Description
Network manager gets NTP servers from DHCP but do not update timesyncd to use it which keeps using ntp.ubuntu.com.
This is a problem on private networks which do not have access to public internet. On this type of network the configuration of timesyncd must be updated manually instead of inheriting the conf from the dhcp servers.
This can be integrated with a NM dispatcher script such as below:
etc/NetworkMana
==8<===
#! /usr/bin/bash
[ -n "$CONNECTION_UUID" ] || exit
INTERFACE=$1
ACTION=$2
case $ACTION in
up | dhcp4-change | dhcp6-change)
[ -n "$DHCP4_
mkdir -p /etc/systemd/
cat<<EOF > /etc/systemd/
[Time]
NTP=$DHCP4_
RootDistanceMax
EOF
systemctl restart systemd-timesyncd
;;
down)
rm -f /etc/systemd/
systemctl restart systemd-timesyncd
;;
esac
==8<===
ProblemType: Bug
DistroRelease: Ubuntu 21.10
Package: network-manager 1.30.0-1ubuntu3
ProcVersionSign
Uname: Linux 5.11.0-18-generic x86_64
NonfreeKernelMo
ApportVersion: 2.20.11-0ubuntu67
Architecture: amd64
CasperMD5CheckR
CurrentDesktop: ubuntu:GNOME
Date: Mon Jun 28 14:08:52 2021
InstallationDate: Installed on 2020-05-31 (393 days ago)
InstallationMedia: Ubuntu 20.10 "Groovy Gorilla" - Alpha amd64 (20200527)
RebootRequiredPkgs:
linux-
linux-base
SourcePackage: network-manager
UpgradeStatus: No upgrade log present (probably fresh install)
nmcli-nm:
RUNNING VERSION STATE STARTUP CONNECTIVITY NETWORKING WIFI-HW WIFI WWAN-HW WWAN
running 1.30.0 connected started full enabled enabled disabled enabled enabled
summary: |
- NTP servers from DCHP are not propagated to timesyncd + NTP servers from DHCP are not propagated to timesyncd |
Changed in network-manager (Ubuntu): | |
assignee: | nobody → Heather Ellsworth (hellsworth) |
tags: | added: rls-ii-incoming |
Changed in network-manager (Ubuntu Focal): | |
importance: | Undecided → High |
assignee: | nobody → Heather Ellsworth (hellsworth) |
tags: | added: oem-priority originate-from-1933586 wenshan |
Changed in oem-priority: | |
importance: | Undecided → Critical |
Changed in oem-priority: | |
assignee: | nobody → Cyrus Lien (cyruslien) |
Updates version of the script.