Ntp schema definition permits empty ntp cloud-config, but code disallows

Bug #1724951 reported by Chad Smith
10
This bug affects 1 person
Affects Status Importance Assigned to Milestone
cloud-init
Fix Released
Medium
Chad Smith
cloud-init (Ubuntu)
Fix Released
Medium
Unassigned
Xenial
Fix Released
Medium
Unassigned
Zesty
Fix Released
Medium
Unassigned
Artful
Fix Released
Medium
Unassigned

Bug Description

http://pad.lv/1724951
https://bugs.launchpad.net/ubuntu/+source/cloud-init/+bug/1724951

=== Begin SRU Template ===
[Impact]
Customers who provide the following cloud-config will get a Runtime error
#cloud-config
ntp:

The expected behavior, per docs, is that an empty ntp configuration will result in
"4 pools will be used in the format {0-3}.{distro}.pool.ntp.org.".

[Test Case]

if [ ! -f './lxc-proposed-snapshot' ]; then
  wget https://raw.githubusercontent.com/cloud-init/ubuntu-sru/master/bin/lxc-proposed-snapshot;
  chmod 755 lxc-proposed-snapshot;
fi

# 1. Provide a empty ntp configuration to cloud-init
cat > install-ntp.conf <<EOF
#cloud-config
ntp:
EOF

# 2.
for release in xenial zesty artful; do
        ref=$release-proposed;
        echo "$release START --------------";
        lxc-proposed-snapshot --proposed --publish $release $ref;
        lxc init $ref test-$release;
        lxc config set test-$release user.user-data - < install-ntp.conf;
        lxc start test-$release;
        sleep 10;
        # no runtime error
        lxc exec test-$release -- cat /run/cloud-init/result.json
        # ntp installed
        lxc exec test-$release -- dpkg-query --show ntp;
        # default pools
        lxc exec test-$release -- grep pool /etc/ntp.conf
done

[Regression Potential]
Minimal, this fixes only a corner case where cloud-config ntp specified is completely empty.
Any more complex ntp configuration are unaffected by code changes.

[Other Info]
Upstream commit at
  https://git.launchpad.net/cloud-init/commit/?id=6bc504e41666

=== End SRU Template ===

Related branches

Chad Smith (chad.smith)
Changed in cloud-init:
status: New → In Progress
importance: Undecided → Medium
assignee: nobody → Chad Smith (chad.smith)
description: updated
Chad Smith (chad.smith)
description: updated
Revision history for this message
Chris Halse Rogers (raof) wrote : Proposed package upload rejected

An upload of cloud-init to xenial-proposed has been rejected from the upload queue for the following reason: "Please re-upload including the changelog entries from the unreleased version in -proposed in the .changes file. Thanks!".

Revision history for this message
Chris Halse Rogers (raof) wrote :

An upload of cloud-init to zesty-proposed has been rejected from the upload queue for the following reason: "Please re-upload including the changelog entries from the unreleased version in -proposed in the .changes file. Thanks!".

Changed in cloud-init (Ubuntu Artful):
status: New → Fix Committed
tags: added: verification-needed verification-needed-artful
Revision history for this message
Chris Halse Rogers (raof) wrote : Please test proposed package

Hello Chad, or anyone else affected,

Accepted cloud-init into artful-proposed. The package will build now and be available at https://launchpad.net/ubuntu/+source/cloud-init/17.1-25-g17a15f9e-0ubuntu1~17.10.1 in a few hours, and then in the -proposed repository.

Please help us by testing this new package. See https://wiki.ubuntu.com/Testing/EnableProposed for documentation on how to enable and use -proposed.Your feedback will aid us getting this update out to other Ubuntu users.

If this package fixes the bug for you, please add a comment to this bug, mentioning the version of the package you tested and change the tag from verification-needed-artful to verification-done-artful. If it does not fix the bug for you, please add a comment stating that, and change the tag to verification-failed-artful. In either case, details of your testing will help us make a better decision.

Further information regarding the verification process can be found at https://wiki.ubuntu.com/QATeam/PerformingSRUVerification . Thank you in advance!

Scott Moser (smoser)
Changed in cloud-init (Ubuntu Xenial):
status: New → Confirmed
Changed in cloud-init (Ubuntu Zesty):
status: New → Confirmed
Changed in cloud-init (Ubuntu Xenial):
status: Confirmed → In Progress
Changed in cloud-init (Ubuntu Zesty):
status: Confirmed → In Progress
Changed in cloud-init (Ubuntu):
status: New → In Progress
importance: Undecided → Medium
Changed in cloud-init (Ubuntu Xenial):
importance: Undecided → Medium
Changed in cloud-init (Ubuntu Zesty):
importance: Undecided → Medium
Changed in cloud-init (Ubuntu Artful):
importance: Undecided → Medium
Revision history for this message
Chris Halse Rogers (raof) wrote :

Hello Chad, or anyone else affected,

Accepted cloud-init into zesty-proposed. The package will build now and be available at https://launchpad.net/ubuntu/+source/cloud-init/17.1-25-g17a15f9e-0ubuntu1~17.04.1 in a few hours, and then in the -proposed repository.

Please help us by testing this new package. See https://wiki.ubuntu.com/Testing/EnableProposed for documentation on how to enable and use -proposed.Your feedback will aid us getting this update out to other Ubuntu users.

If this package fixes the bug for you, please add a comment to this bug, mentioning the version of the package you tested and change the tag from verification-needed-zesty to verification-done-zesty. If it does not fix the bug for you, please add a comment stating that, and change the tag to verification-failed-zesty. In either case, details of your testing will help us make a better decision.

Further information regarding the verification process can be found at https://wiki.ubuntu.com/QATeam/PerformingSRUVerification . Thank you in advance!

Changed in cloud-init (Ubuntu Zesty):
status: In Progress → Fix Committed
tags: added: verification-needed-zesty
Revision history for this message
Chris Halse Rogers (raof) wrote :

Hello Chad, or anyone else affected,

Accepted cloud-init into xenial-proposed. The package will build now and be available at https://launchpad.net/ubuntu/+source/cloud-init/17.1-25-g17a15f9e-0ubuntu1~16.04.1 in a few hours, and then in the -proposed repository.

Please help us by testing this new package. See https://wiki.ubuntu.com/Testing/EnableProposed for documentation on how to enable and use -proposed.Your feedback will aid us getting this update out to other Ubuntu users.

If this package fixes the bug for you, please add a comment to this bug, mentioning the version of the package you tested and change the tag from verification-needed-xenial to verification-done-xenial. If it does not fix the bug for you, please add a comment stating that, and change the tag to verification-failed-xenial. In either case, details of your testing will help us make a better decision.

Further information regarding the verification process can be found at https://wiki.ubuntu.com/QATeam/PerformingSRUVerification . Thank you in advance!

Changed in cloud-init (Ubuntu Xenial):
status: In Progress → Fix Committed
tags: added: verification-needed-xenial
Revision history for this message
Chad Smith (chad.smith) wrote :

xenial START --------------
creating xenial-proposed-226181656
[sudo] password for csmith:
--proposed --
...
Get:1 http://archive.ubuntu.com/ubuntu xenial-proposed/main amd64 cloud-init all 17.1-25-g17a15f9e-0ubuntu1~16.04.1 [342 kB]
...
{
 "v1": {
  "datasource": "DataSourceNoCloud [seed=/var/lib/cloud/seed/nocloud-net][dsmode=net]",
  "errors": []
 }
}
ntp 1:4.2.8p4+dfsg-3ubuntu5.7
# on 2011-02-08 (LP: #104525). See http://www.pool.ntp.org/join.html for
# pools
pool 0.ubuntu.pool.ntp.org iburst
pool 1.ubuntu.pool.ntp.org iburst
pool 2.ubuntu.pool.ntp.org iburst
pool 3.ubuntu.pool.ntp.org iburst
# pool ntp.ubuntu.com
# Needed for adding pool entries

Creating zesty-proposed-312292735
--proposed --
...
Get:1 http://archive.ubuntu.com/ubuntu zesty-proposed/main amd64 cloud-init all 17.1-25-g17a15f9e-0ubuntu1~17.04.1 [339 kB]
...
{
 "v1": {
  "datasource": "DataSourceNoCloud [seed=/var/lib/cloud/seed/nocloud-net][dsmode=net]",
  "errors": []
 }
}
ntp 1:4.2.8p9+dfsg-2ubuntu1.2
# on 2011-02-08 (LP: #104525). See http://www.pool.ntp.org/join.html for
# pools
pool 0.ubuntu.pool.ntp.org iburst
pool 1.ubuntu.pool.ntp.org iburst
pool 2.ubuntu.pool.ntp.org iburst
pool 3.ubuntu.pool.ntp.org iburst
# pool ntp.ubuntu.com
# Needed for adding pool entries

artful START --------------
Creating artful-proposed-85532394
...
Get:1 http://archive.ubuntu.com/ubuntu artful-proposed/main amd64 cloud-init all 17.1-25-g17a15f9e-0ubuntu1~17.10.1 [333 kB]
...
{
 "v1": {
  "datasource": "DataSourceNoCloud [seed=/var/lib/cloud/seed/nocloud-net][dsmode=net]",
  "errors": []
 }
}
ntp 1:4.2.8p10+dfsg-5ubuntu3
# on 2011-02-08 (LP: #104525). See http://www.pool.ntp.org/join.html for
# pools
pool 0.ubuntu.pool.ntp.org iburst
pool 1.ubuntu.pool.ntp.org iburst
pool 2.ubuntu.pool.ntp.org iburst
pool 3.ubuntu.pool.ntp.org iburst
# pool ntp.ubuntu.com
# Needed for adding pool entries

=== End Abridged SRU verifcation output ===

description: updated
tags: added: verification-done verification-done-artful verification-done-xenial verification-done-zesty
removed: verification-needed verification-needed-artful verification-needed-xenial verification-needed-zesty
Revision history for this message
Launchpad Janitor (janitor) wrote :

This bug was fixed in the package cloud-init - 17.1-25-g17a15f9e-0ubuntu1~17.10.1

---------------
cloud-init (17.1-25-g17a15f9e-0ubuntu1~17.10.1) artful-proposed; urgency=medium

  * New upstream snapshot.
    - resizefs: Fix regression when system booted with root=PARTUUID=
      (LP: #1725067)
    - tools: make yum package installation more reliable
    - citest: fix remaining warnings raised by integration tests.
    - citest: show the class actual class name in results.
    - ntp: fix config module schema to allow empty ntp config
      (LP: #1724951)
    - tools: disable fastestmirror if using proxy [Joshua Powers]
    - schema: Log debug instead of warning when jsonschema is not available.
      (LP: #1724354)

 -- Chad Smith <email address hidden> Mon, 23 Oct 2017 15:07:35 -0600

Changed in cloud-init (Ubuntu):
status: In Progress → Fix Released
Changed in cloud-init (Ubuntu Artful):
status: Fix Committed → Fix Released
Revision history for this message
Brian Murray (brian-murray) wrote : Update Released

The verification of the Stable Release Update for cloud-init has completed successfully and the package has now been released to -updates. Subsequently, the Ubuntu Stable Release Updates Team is being unsubscribed and will not receive messages about this bug report. In the event that you encounter a regression using the package from -updates please report a new bug using ubuntu-bug and tag the bug report regression-update so we can easily find any regressions.

Revision history for this message
Łukasz Zemczak (sil2100) wrote : Please test proposed package

Hello Chad, or anyone else affected,

Accepted cloud-init into zesty-proposed. The package will build now and be available at https://launchpad.net/ubuntu/+source/cloud-init/17.1-27-geb292c18-0ubuntu1~17.04.1 in a few hours, and then in the -proposed repository.

Please help us by testing this new package. See https://wiki.ubuntu.com/Testing/EnableProposed for documentation on how to enable and use -proposed.Your feedback will aid us getting this update out to other Ubuntu users.

If this package fixes the bug for you, please add a comment to this bug, mentioning the version of the package you tested and change the tag from verification-needed-zesty to verification-done-zesty. If it does not fix the bug for you, please add a comment stating that, and change the tag to verification-failed-zesty. In either case, details of your testing will help us make a better decision.

Further information regarding the verification process can be found at https://wiki.ubuntu.com/QATeam/PerformingSRUVerification . Thank you in advance!

tags: added: verification-needed verification-needed-zesty
removed: verification-done verification-done-zesty
Revision history for this message
Łukasz Zemczak (sil2100) wrote :

Hello Chad, or anyone else affected,

Accepted cloud-init into xenial-proposed. The package will build now and be available at https://launchpad.net/ubuntu/+source/cloud-init/17.1-27-geb292c18-0ubuntu1~16.04.1 in a few hours, and then in the -proposed repository.

Please help us by testing this new package. See https://wiki.ubuntu.com/Testing/EnableProposed for documentation on how to enable and use -proposed.Your feedback will aid us getting this update out to other Ubuntu users.

If this package fixes the bug for you, please add a comment to this bug, mentioning the version of the package you tested and change the tag from verification-needed-xenial to verification-done-xenial. If it does not fix the bug for you, please add a comment stating that, and change the tag to verification-failed-xenial. In either case, details of your testing will help us make a better decision.

Further information regarding the verification process can be found at https://wiki.ubuntu.com/QATeam/PerformingSRUVerification . Thank you in advance!

tags: added: verification-needed-xenial
removed: verification-done-xenial
Revision history for this message
Chad Smith (chad.smith) wrote :

=== Abridged SRU verifcation output ===
$ for release in xenial zesty artful; do
> ref=$release-proposed;
> echo "$release START --------------";
> lxc-proposed-snapshot -p -P $release $ref;
> lxc init $ref test-$release;
> lxc config set test-$release user.user-data - < install-ntp.conf;
> lxc start test-$release;
> sleep 10;
> lxc exec test-$release -- cat /run/cloud-init/result.json
> lxc exec test-$release -- dpkg-query --show ntp;
> lxc exec test-$release -- grep pool /etc/ntp.conf
> done
xenial START --------------
Creating xenial-proposed-115658625
...
Get:1 http://archive.ubuntu.com/ubuntu xenial-proposed/main amd64 cloud-init all 17.1-27-geb292c18-0ubuntu1~16.04.1 [341 kB]
Creating test-xenial

{
 "v1": {
  "datasource": "DataSourceNoCloud [seed=/var/lib/cloud/seed/nocloud-net][dsmode=net]",
  "errors": []
 }
}
ntp 1:4.2.8p4+dfsg-3ubuntu5.7
# on 2011-02-08 (LP: #104525). See http://www.pool.ntp.org/join.html for
# pools
pool 0.ubuntu.pool.ntp.org iburst
pool 1.ubuntu.pool.ntp.org iburst
pool 2.ubuntu.pool.ntp.org iburst
pool 3.ubuntu.pool.ntp.org iburst
# pool ntp.ubuntu.com
# Needed for adding pool entries

zesty START --------------
Creating zesty-proposed-63815953
...
Get:1 http://archive.ubuntu.com/ubuntu zesty-proposed/main amd64 cloud-init all 17.1-27-geb292c18-0ubuntu1~17.04.1 [339 kB]
...
Creating test-zesty
{
 "v1": {
  "datasource": "DataSourceNoCloud [seed=/var/lib/cloud/seed/nocloud-net][dsmode=net]",
  "errors": []
 }
}
ntp 1:4.2.8p9+dfsg-2ubuntu1.2
# on 2011-02-08 (LP: #104525). See http://www.pool.ntp.org/join.html for
# pools
pool 0.ubuntu.pool.ntp.org iburst
pool 1.ubuntu.pool.ntp.org iburst
pool 2.ubuntu.pool.ntp.org iburst
pool 3.ubuntu.pool.ntp.org iburst
# pool ntp.ubuntu.com
# Needed for adding pool entries

artful START --------------
Creating artful-proposed-1092522261
...
Get:1 http://archive.ubuntu.com/ubuntu artful-proposed/main amd64 cloud-init all 17.1-27-geb292c18-0ubuntu1~17.10.1 [332 kB]
...
Creating test-artful
{
 "v1": {
  "datasource": "DataSourceNoCloud [seed=/var/lib/cloud/seed/nocloud-net][dsmode=net]",
  "errors": []
 }
}
ntp 1:4.2.8p10+dfsg-5ubuntu3
# on 2011-02-08 (LP: #104525). See http://www.pool.ntp.org/join.html for
# pools
pool 0.ubuntu.pool.ntp.org iburst
pool 1.ubuntu.pool.ntp.org iburst
pool 2.ubuntu.pool.ntp.org iburst
pool 3.ubuntu.pool.ntp.org iburst
# pool ntp.ubuntu.com
# Needed for adding pool entries
=== End Abridged SRU verifcation output ===

tags: added: verification-done verification-done-xenial verification-done-zesty
removed: verification-needed verification-needed-xenial verification-needed-zesty
Revision history for this message
Launchpad Janitor (janitor) wrote :
Download full text (7.3 KiB)

This bug was fixed in the package cloud-init - 17.1-27-geb292c18-0ubuntu1~17.04.1

---------------
cloud-init (17.1-27-geb292c18-0ubuntu1~17.04.1) zesty-proposed; urgency=medium

  * New upstream snapshot.
    - EC2: Limit network config to fallback nic, fix local-ipv4 only
      instances. (LP: #1728152)
    - Gentoo: Use "rc-service" rather than "service". [Carlos Konstanski]

cloud-init (17.1-25-g17a15f9e-0ubuntu1~17.04.1) zesty-proposed; urgency=medium

  * New upstream snapshot.
    - resizefs: Fix regression when system booted with root=PARTUUID=
      (LP: #1725067)
    - tools: make yum package installation more reliable
    - citest: fix remaining warnings raised by integration tests.
    - citest: show the class actual class name in results.
    - ntp: fix config module schema to allow empty ntp config
      (LP: #1724951)
    - tools: disable fastestmirror if using proxy [Joshua Powers]

cloud-init (17.1-18-gd4f70470-0ubuntu1~17.04.2) zesty-proposed; urgency=medium

  * cherry-pick 41152f1: schema: Log debug instead of warning when
    jsonschema is absent (LP: #1724354)

cloud-init (17.1-18-gd4f70470-0ubuntu1~17.04.1) zesty-proposed; urgency=medium

  * drop the following cherry picks, now incorporated in snapshot.
    + debian/patches/cpick-a2f8ce9c-Do-not-provide-systemd-fsck-drop...
  * debian/copyright: dep5 updates, reorganize, add Apache 2.0 license.
    (LP: #1718681)
  * debian/control: drop dependency on python3-prettytable
  * debian/rules: install rsyslog file with 0644 mode instead of 0755.
  * debian/rules, debian/apport-launcher.py: add an apport hook. (LP: #1607345)
  * New upstream snapshot (LP: #1721847)
    - simpletable: Fix get_string method to return table-formatted string
    - net: Handle bridge stp values of 0 and convert to boolean type
      [Chad Smith]
    - tools: Give specific --abbrev=8 to "git describe"
    - network: bridge_stp value not always correct [Ryan Harper]
    - tests: re-enable tox with nocloud-kvm support [Joshua Powers]
    - systemd: remove limit on tasks created by cloud-init-final.service.
      [Robert Schweikert]
    - suse: Support addition of zypper repos via cloud-config.
      [Robert Schweikert]
    - tests: Combine integration configs and testcases [Joshua Powers]
    - Azure, CloudStack: Support reading dhcp options from systemd-networkd.
      [Dimitri John Ledkov]
    - packages/debian/copyright: remove mention of boto and MIT license
    - systemd: only mention Before=apt-daily.service on debian based distros.
      [Robert Schweikert]
    - Add missing simpletable and simpletable tests for failed merge
      [Chad Smith]
    - Remove prettytable dependency, introduce simpletable [Andrew Jorgensen]
    - debian/copyright: dep5 updates, reorganize, add Apache 2.0 license.
      [Joshua Powers]
    - tests: remove dependency on shlex [Joshua Powers]
    - AltCloud: Trust PATH for udevadm and modprobe.
    - DataSourceOVF: use util.find_devs_with(TYPE=iso9660)
      [Ryan Harper]
    - tests: remove a temp file used in bootcmd tests.
    - release 17.1
    - doc: document GCE datasource. [Arnd Hannemann]
    - suse: updates to templates to support openSUSE and SLES.
      [...

Read more...

Changed in cloud-init (Ubuntu Zesty):
status: Fix Committed → Fix Released
Revision history for this message
Launchpad Janitor (janitor) wrote :
Download full text (7.3 KiB)

This bug was fixed in the package cloud-init - 17.1-27-geb292c18-0ubuntu1~16.04.1

---------------
cloud-init (17.1-27-geb292c18-0ubuntu1~16.04.1) xenial-proposed; urgency=medium

  * New upstream snapshot.
    - EC2: Limit network config to fallback nic, fix local-ipv4 only
      instances. (LP: #1728152)
    - Gentoo: Use "rc-service" rather than "service". [Carlos Konstanski]

cloud-init (17.1-25-g17a15f9e-0ubuntu1~16.04.1) xenial-proposed; urgency=medium

  * New upstream snapshot.
    - resizefs: Fix regression when system booted with root=PARTUUID=
      (LP: #1725067)
    - tools: make yum package installation more reliable
    - citest: fix remaining warnings raised by integration tests.
    - citest: show the class actual class name in results.
    - ntp: fix config module schema to allow empty ntp config
      (LP: #1724951)
    - tools: disable fastestmirror if using proxy [Joshua Powers]

cloud-init (17.1-18-gd4f70470-0ubuntu1~16.04.2) xenial-proposed; urgency=medium

  * cherry-pick 41152f1: schema: Log debug instead of warning when
    jsonschema is absent (LP: #1724354)

cloud-init (17.1-18-gd4f70470-0ubuntu1~16.04.1) xenial-proposed; urgency=medium

  * drop the following cherry picks, now incorporated in snapshot.
    + debian/patches/cpick-a2f8ce9c-Do-not-provide-systemd-fsck-drop...
  * debian/copyright: dep5 updates, reorganize, add Apache 2.0 license.
    (LP: #1718681)
  * debian/control: drop dependency on python3-prettytable
  * debian/rules: install rsyslog file with 0644 mode instead of 0755.
  * debian/rules, debian/apport-launcher.py: add an apport hook. (LP: #1607345)
  * New upstream snapshot. (LP: #1721847)
    - simpletable: Fix get_string method to return table-formatted string
    - net: Handle bridge stp values of 0 and convert to boolean type
      [Chad Smith]
    - tools: Give specific --abbrev=8 to "git describe"
    - network: bridge_stp value not always correct [Ryan Harper]
    - tests: re-enable tox with nocloud-kvm support [Joshua Powers]
    - systemd: remove limit on tasks created by cloud-init-final.service.
      [Robert Schweikert]
    - suse: Support addition of zypper repos via cloud-config.
      [Robert Schweikert]
    - tests: Combine integration configs and testcases [Joshua Powers]
    - Azure, CloudStack: Support reading dhcp options from systemd-networkd.
      [Dimitri John Ledkov]
    - packages/debian/copyright: remove mention of boto and MIT license
    - systemd: only mention Before=apt-daily.service on debian based distros.
      [Robert Schweikert]
    - Add missing simpletable and simpletable tests for failed merge
      [Chad Smith]
    - Remove prettytable dependency, introduce simpletable [Andrew Jorgensen]
    - debian/copyright: dep5 updates, reorganize, add Apache 2.0 license.
      [Joshua Powers]
    - tests: remove dependency on shlex [Joshua Powers]
    - AltCloud: Trust PATH for udevadm and modprobe.
    - DataSourceOVF: use util.find_devs_with(TYPE=iso9660)
      [Ryan Harper]
    - tests: remove a temp file used in bootcmd tests.
    - release 17.1
    - doc: document GCE datasource. [Arnd Hannemann]
    - suse: updates to templates to support openSUSE and SLES.
  ...

Read more...

Changed in cloud-init (Ubuntu Xenial):
status: Fix Committed → Fix Released
Revision history for this message
Scott Moser (smoser) wrote : Fixed in Cloud-init 1705804

This bug is believed to be fixed in cloud-init in 1705804. 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: In Progress → 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.