request ntp-servers does not remove manually configured servers

Bug #1342522 reported by Tom Downes
6
This bug affects 1 person
Affects Status Importance Assigned to Milestone
isc-dhcp (Ubuntu)
New
Undecided
Unassigned

Bug Description

Suppose that one has the following lines in /etc/ntp.conf

server ntp.com iburst
restrict ntp.com mask 255.255.255.255 nomodify notrap nopeer noquery
server ntp2.com iburst
restrict ntp2.com mask 255.255.255.255 nomodify notrap nopeer noquery
server ntp3.com iburst
restrict ntp3.com mask 255.255.255.255 nomodify notrap nopeer noquery
server ntp4.com iburst
restrict ntp4.com mask 255.255.255.255 nomodify notrap nopeer noquery

The idea behind requesting DHCP option 42 is to replace these servers with those provided from a DHCP server. I find that, in trusty, only the first server is replaced in /var/lib/ntp/ntp.conf.dhcp.

I think this traces back to the following line in /etc/dhcp/dhclient-exit-hooks.d/ntp:

sed -r -e '/^ *(server *[^1][^2][^7]\.|peer).*$/d' $NTP_CONF

I venture that this regex is intended to avoid the "server 127.0.0.1 fudge" line one often sees. But by requiring a direct match to the '.' separator in the IP address, it has the effect that any server line in which the shortname of the host is more than 3 characters long won't be removed.

The same sed in Debian 7 is:

sed -r -e '/^ *(server|peer).*$/d' $NTP_CONF

This may remove that localhost fudging, but it clearly removes any hardcoded /etc/ntp.conf servers.

ProblemType: Bug
DistroRelease: Ubuntu 14.04
Package: isc-dhcp-client 4.2.4-7ubuntu12
ProcVersionSignature: Ubuntu 3.13.0-30.55-generic 3.13.11.2
Uname: Linux 3.13.0-30-generic x86_64
ApportVersion: 2.14.1-0ubuntu3.2
Architecture: amd64
Date: Tue Jul 15 23:55:21 2014
InstallationDate: Installed on 2014-07-10 (5 days ago)
InstallationMedia: Ubuntu-Server 14.04 LTS "Trusty Tahr" - Release amd64 (20140416.2)
ProcEnviron:
 TERM=xterm-256color
 PATH=(custom, no user)
 XDG_RUNTIME_DIR=<set>
 LANG=en_US.UTF-8
 SHELL=/bin/bash
SourcePackage: isc-dhcp
UpgradeStatus: No upgrade log present (probably fresh install)

Revision history for this message
Tom Downes (tpdownes) wrote :
To post a comment you must log in.
This report contains Public information  
Everyone can see this information.

Other bug subscribers

Remote bug watches

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