cc_ntp generates wrong config for ntpd in debian (buster)

Bug #1836598 reported by Dmitry Shkuratov on 2019-07-15
8
This bug affects 1 person
Affects Status Importance Assigned to Milestone
cloud-init
Medium
Unassigned

Bug Description

when i use the following configuration:

ntp:
  enabled: true
  ntp_client: ntp
  pools: [0.int.pool.ntp.org, 1.int.pool.ntp.org, ntp.myorg.org]
  servers:
    - ntp.server.local
    - ntp.ubuntu.com
    - 192.168.23.2

wrong configuration pools received,
cat /etc/ntpd.conf

...skip...
# pool.ntp.org maps to about 1000 low-stratum NTP servers. Your server will
# pick a different set every time it starts up. Please consider joining the
# pool: <http://www.pool.ntp.org/join.html>
# poolspool 0.int.pool.ntp.org iburst
pool 1.int.pool.ntp.org iburst
pool ntp.myorg.org iburst
# servers
server ntp.server.local iburst
server ntp.ubuntu.com iburst
server 192.168.23.2 iburst

# Access control configuration; see /usr/share/doc/ntp-doc/html/accopt.html for
...skip...

wrong line >> # poolspool 0.int.pool.ntp.org iburst

system>
Debian GNU/Linux 10 (buster)
cloud-init 18.3-6

Related branches

Dan Watkins (daniel-thewatkins) wrote :

Hi Dmitry,

Thanks for filing this bug! I cannot reproduce this using the latest version of cloud-init (on Ubuntu). Could you try using the latest version of cloud-init and let me know if the problem still exists?

Thanks!

Dan

Ryan Harper (raharper) wrote :

I think the bug is in the cloud-init ntp.conf template for debian (template/ntp.conf.debian.tmpl).
This needs the unittest fixed as well since it didn't check that the pool and server items
were at the beginning of each line.

Changed in cloud-init:
importance: Undecided → Medium
status: New → Confirmed

This bug is fixed with commit 14048171 to cloud-init on branch master.
To view that commit see the following URL:
https://git.launchpad.net/cloud-init/commit/?id=14048171

Changed in cloud-init:
status: Confirmed → Fix Committed

This bug is believed to be fixed in cloud-init in version 19.2. If this is still a problem for you, please make a comment and set the state back to New

Thank you.

Changed in cloud-init:
status: Fix Committed → Fix Released
To post a comment you must log in.
This report contains Public information  Edit
Everyone can see this information.

Other bug subscribers