Even with removing 'ntp-servers' from /etc/dhcp/dhclient.conf,
/var/lib/ntp/ntp.conf.dhcp is written out. Steps to reproduce:

Current:

| ubuntu@juju-dca1e3-12:~$ ls -la /var/lib/ntp/ntp.conf.dhcp
| -rw-r--r-- 1 ntp ntp 2804 Feb 23  2018 /var/lib/ntp/ntp.conf.dhcp

Update removing 'ntp-servers':

| ubuntu@juju-dca1e3-12:~$ sudo vi /etc/dhcp/dhclient.conf
| (edit edit edit)

Restart networking:

| ubuntu@juju-dca1e3-12:~$ sudo service networking restart

Confirm dhclient restarted:

| ubuntu@juju-dca1e3-12:~$ ps afxuww | grep dhcl
| root      2864  0.0  0.0  16132   928 ?        Ss   04:41   0:00 
/sbin/dhclient -1 -v -pf /run/dhclient.ens4.pid -lf 
/var/lib/dhcp/dhclient.ens4.leases -I -df /var/lib/dhcp/dhclient6.ens4.leases 
ens4

Check timestamp / date:

| ubuntu@juju-dca1e3-12:~$ ls -la /var/lib/ntp/ntp.conf.dhcp
| -rw-r--r-- 1 root root 2804 Oct 28 04:41 /var/lib/ntp/ntp.conf.dhcp

It's actually because ntp_servers_setup_add() in /etc/dhcp/dhclient-
exit-hooks.d/ntp writes that out no matter what.

-- 
You received this bug notification because you are a member of Ubuntu
Touch seeded packages, which is subscribed to ntp in Ubuntu.
https://bugs.launchpad.net/bugs/1758775

Title:
  DHCP-received NTP servers override the configuration of the NTP charm

Status in NTP Charm:
  Triaged
Status in ntp package in Ubuntu:
  Confirmed

Bug description:
  Example from GCE, but could be seen in MAAS/OpenStack or any other
  environment where NTP server addresses are supplied via DHCP:
  https://pastebin.ubuntu.com/p/TkjfzgbBhW/

  When a user configures NTP with this charm, they should reasonably
  expect their configuration to be reliably applied rather than
  overridden by their cloud provider.

To manage notifications about this bug go to:
https://bugs.launchpad.net/ntp-charm/+bug/1758775/+subscriptions

-- 
Mailing list: https://launchpad.net/~touch-packages
Post to     : touch-packages@lists.launchpad.net
Unsubscribe : https://launchpad.net/~touch-packages
More help   : https://help.launchpad.net/ListHelp

Reply via email to