On a few instances in a public cloud, mostly seen in GCE, ntp seems incorrectly set up with:
| ubuntu@juju-453c71-0:~$ ntpq -pn
| remote refid st t when poll reach delay offset jitter
| ==============================================================================
| *169.254.169.254 71.79.79.71 2 u 737 1024 377 0.657 0.136 0.147
We have /etc/ntp.conf configured to use ntp.ubuntu.com as a 'pool' host. Turns out, it seems the /etc/init.d/ntp prefers the DHCP version over our configured ntp.conf:
| if [ /var/lib/ntp/ntp.conf.dhcp -nt /etc/ntp.conf ]; then
| NTPD_OPTS="$NTPD_OPTS -c /var/lib/ntp/ntp.conf.dhcp"
| fi
| ubuntu@juju-453c71-0:/etc$ ls -la /var/lib/ntp/ntp.conf.dhcp /etc/ntp.conf
| -rw-r--r-- 1 root root 626 Feb 25 08:54 /etc/ntp.conf
| -rw-r--r-- 1 root root 897 Mar 29 21:00 /var/lib/ntp/ntp.conf.dhcp
I think this is wrong, if /etc/ntp.conf is configured, it should use that over what DHCP/dhclient provides.
Hi,
On a few instances in a public cloud, mostly seen in GCE, ntp seems incorrectly set up with:
| ubuntu@ juju-453c71- 0:~$ ntpq -pn ======= ======= ======= ======= ======= ======= ======= ======= ======= ======= =
| remote refid st t when poll reach delay offset jitter
| =======
| *169.254.169.254 71.79.79.71 2 u 737 1024 377 0.657 0.136 0.147
We have /etc/ntp.conf configured to use ntp.ubuntu.com as a 'pool' host. Turns out, it seems the /etc/init.d/ntp prefers the DHCP version over our configured ntp.conf:
| if [ /var/lib/ ntp/ntp. conf.dhcp -nt /etc/ntp.conf ]; then "$NTPD_ OPTS -c /var/lib/ ntp/ntp. conf.dhcp"
| NTPD_OPTS=
| fi
| ubuntu@ juju-453c71- 0:/etc$ ls -la /var/lib/ ntp/ntp. conf.dhcp /etc/ntp.conf ntp/ntp. conf.dhcp
| -rw-r--r-- 1 root root 626 Feb 25 08:54 /etc/ntp.conf
| -rw-r--r-- 1 root root 897 Mar 29 21:00 /var/lib/
I think this is wrong, if /etc/ntp.conf is configured, it should use that over what DHCP/dhclient provides.
Thanks,
Haw