← Back to team overview

group.of.nepali.translators team mailing list archive

[Bug 1823098] [NEW] /etc/init.d/ntp prefers DHCP over configured /etc/ntp.conf

 

Public bug reported:

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="$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.

| ubuntu@juju-453c71-0:~$ cat /etc/*release
| DISTRIB_RELEASE=16.04
| DISTRIB_DESCRIPTION="Ubuntu 16.04.6 LTS"
| VERSION_ID="16.04"

| ubuntu@juju-453c71-0:~$ dpkg-query -S /etc/init.d/ntp
| ntp: /etc/init.d/ntp

| ubuntu@juju-453c71-0:~$ apt-cache policy ntp
| ntp:
|   Installed: 1:4.2.8p4+dfsg-3ubuntu5.9
|   Candidate: 1:4.2.8p4+dfsg-3ubuntu5.9
|   Version table:
|  *** 1:4.2.8p4+dfsg-3ubuntu5.9 500
|         500 http://us-central1.gce.archive.ubuntu.com/ubuntu xenial-updates/main amd64 Packages
|         500 http://security.ubuntu.com/ubuntu xenial-security/main amd64 Packages


Thanks,

Haw

** Affects: ntp (Ubuntu)
     Importance: Undecided
         Status: New

** Affects: ntp (Ubuntu Xenial)
     Importance: Undecided
         Status: New

** Description changed:

  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="$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.
  
+ | ubuntu@juju-453c71-0:~$ cat /etc/*release
+ | DISTRIB_RELEASE=16.04
+ | DISTRIB_DESCRIPTION="Ubuntu 16.04.6 LTS"
+ | VERSION_ID="16.04"
+ 
+ | ubuntu@juju-453c71-0:~$ dpkg-query -S /etc/init.d/ntp
+ | ntp: /etc/init.d/ntp
+ 
+ | ubuntu@juju-453c71-0:~$ apt-cache policy ntp
+ | ntp:
+ |   Installed: 1:4.2.8p4+dfsg-3ubuntu5.9
+ |   Candidate: 1:4.2.8p4+dfsg-3ubuntu5.9
+ |   Version table:
+ |  *** 1:4.2.8p4+dfsg-3ubuntu5.9 500
+ |         500 http://us-central1.gce.archive.ubuntu.com/ubuntu xenial-updates/main amd64 Packages
+ |         500 http://security.ubuntu.com/ubuntu xenial-security/main amd64 Packages
+ 
  
  Thanks,
  
  Haw

** Also affects: ntp (Ubuntu Xenial)
   Importance: Undecided
       Status: New

-- 
You received this bug notification because you are a member of नेपाली
भाषा समायोजकहरुको समूह, which is subscribed to Xenial.
Matching subscriptions: Ubuntu 16.04 Bugs
https://bugs.launchpad.net/bugs/1823098

Title:
  /etc/init.d/ntp prefers DHCP over configured /etc/ntp.conf

Status in ntp package in Ubuntu:
  New
Status in ntp source package in Xenial:
  New

Bug description:
  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="$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.

  | ubuntu@juju-453c71-0:~$ cat /etc/*release
  | DISTRIB_RELEASE=16.04
  | DISTRIB_DESCRIPTION="Ubuntu 16.04.6 LTS"
  | VERSION_ID="16.04"

  | ubuntu@juju-453c71-0:~$ dpkg-query -S /etc/init.d/ntp
  | ntp: /etc/init.d/ntp

  | ubuntu@juju-453c71-0:~$ apt-cache policy ntp
  | ntp:
  |   Installed: 1:4.2.8p4+dfsg-3ubuntu5.9
  |   Candidate: 1:4.2.8p4+dfsg-3ubuntu5.9
  |   Version table:
  |  *** 1:4.2.8p4+dfsg-3ubuntu5.9 500
  |         500 http://us-central1.gce.archive.ubuntu.com/ubuntu xenial-updates/main amd64 Packages
  |         500 http://security.ubuntu.com/ubuntu xenial-security/main amd64 Packages


  Thanks,

  Haw

To manage notifications about this bug go to:
https://bugs.launchpad.net/ubuntu/+source/ntp/+bug/1823098/+subscriptions


Follow ups