cc_ntp generates wrong config for ntpd in debian (buster)

Bug #1836598 reported by Dmitry Shkuratov
8
This bug affects 1 person
Affects Status Importance Assigned to Milestone
cloud-init
Fix Released
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

Revision history for this message
Dan Watkins (oddbloke) 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

Revision history for this message
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
Revision history for this message
Server Team CI bot (server-team-bot) wrote :

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
Revision history for this message
Ryan Harper (raharper) wrote : Fixed in cloud-init version 19.2.

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
Revision history for this message
James Falcon (falcojr) wrote :
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.