ntp dhclient exit hook does not remove most servers

Bug #1603947 reported by Gavin Panella
6
This bug affects 1 person
Affects Status Importance Assigned to Milestone
ntp (Ubuntu)
New
Undecided
Unassigned
Nominated for Trusty by Dan Watkins

Bug Description

/etc/dhcp/dhclient-exit-hooks.d/ntp uses the following command to copy
/etc/ntp.conf, stripping all-but-local NTP servers:

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

However this expression is almost completely broken. It will eliminate
"server foo.example.com" but not "server foobar.example.com", "server
216.1.2.3" but not "server 217.1.2.3" or "server 10.1.2.3".

This has been noted in bug 575458 by Jeffrey Hutzelman and Robie Basak
has corrected this problem in Xenial, but this behaviour MAY cause
problems for MAAS 2.1 (currently in development) when Trusty is deployed
or used on a device on a MAAS-managed network.

Context: MAAS 2.1 will be managing an NTP service and informing DHCP
clients to use it via the ntp-servers option.

I estimate that this would be a low-impact problem; failure modes are
likely to be fairly benign. I'm filing this bug because, well, it is a
bug, and it's documenting what might turn out to be a genuine problem.

ProblemType: Bug
DistroRelease: Ubuntu 14.04
Package: ntp 1:4.2.6.p5+dfsg-3ubuntu2.14.04.8
ProcVersionSignature: Ubuntu 4.2.0-42.49~14.04.1-generic 4.2.8-ckt12
Uname: Linux 4.2.0-42-generic x86_64
ApportVersion: 2.14.1-0ubuntu3.21
Architecture: amd64
Date: Mon Jul 18 11:24:15 2016
InstallationDate: Installed on 2016-04-13 (95 days ago)
InstallationMedia: Ubuntu-Server 14.04.4 LTS "Trusty Tahr" - Release amd64 (20160217.1)
SourcePackage: ntp
UpgradeStatus: No upgrade log present (probably fresh install)

Revision history for this message
Gavin Panella (allenap) wrote :
Changed in maas:
status: New → Triaged
importance: Undecided → Low
summary: - dhclient exit hook does not remove most servers
+ ntp dhclient exit hook does not remove most servers
Gavin Panella (allenap)
no longer affects: maas
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.