Ntp schema definition permits empty ntp cloud-config, but code disallows
| 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://
https:/
=== 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}.{
[Test Case]
if [ ! -f './lxc-
wget https:/
chmod 755 lxc-proposed-
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
echo "$release START --------------";
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-
# 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:/
=== End SRU Template ===
Related branches
- Server Team CI bot: Approve (continuous-integration)
- cloud-init Commiters: Pending requested
-
Diff: 848 lines (+260/-107) 21 files modifiedapicloudinit/config/cc_lxd.py (+1/-1)
cloudinit/config/cc_ntp.py (+3/-1)
cloudinit/config/cc_resizefs.py (+13/-30)
cloudinit/config/cc_users_groups.py (+2/-1)
cloudinit/config/schema.py (+1/-1)
debian/changelog (+16/-0)
doc/examples/cloud-config-user-groups.txt (+3/-3)
tests/cloud_tests/testcases/__init__.py (+7/-0)
tests/cloud_tests/testcases/base.py (+8/-4)
tests/cloud_tests/testcases/examples/including_user_groups.py (+6/-0)
tests/cloud_tests/testcases/examples/including_user_groups.yaml (+5/-2)
tests/cloud_tests/testcases/main/command_output_simple.py (+16/-0)
tests/cloud_tests/testcases/modules/ntp.yaml (+2/-2)
tests/cloud_tests/testcases/modules/user_groups.py (+6/-0)
tests/cloud_tests/testcases/modules/user_groups.yaml (+5/-2)
tests/unittests/test_handler/test_handler_lxd.py (+8/-8)
tests/unittests/test_handler/test_handler_ntp.py (+12/-11)
tests/unittests/test_handler/test_handler_resizefs.py (+57/-34)
tests/unittests/test_handler/test_schema.py (+36/-1)
tools/read-dependencies (+36/-5)
tools/run-centos (+17/-1)
- Server Team CI bot: Approve (continuous-integration)
- Scott Moser: Pending requested
-
Diff: 848 lines (+260/-107) 21 files modifiedapicloudinit/config/cc_lxd.py (+1/-1)
cloudinit/config/cc_ntp.py (+3/-1)
cloudinit/config/cc_resizefs.py (+13/-30)
cloudinit/config/cc_users_groups.py (+2/-1)
cloudinit/config/schema.py (+1/-1)
debian/changelog (+16/-0)
doc/examples/cloud-config-user-groups.txt (+3/-3)
tests/cloud_tests/testcases/__init__.py (+7/-0)
tests/cloud_tests/testcases/base.py (+8/-4)
tests/cloud_tests/testcases/examples/including_user_groups.py (+6/-0)
tests/cloud_tests/testcases/examples/including_user_groups.yaml (+5/-2)
tests/cloud_tests/testcases/main/command_output_simple.py (+16/-0)
tests/cloud_tests/testcases/modules/ntp.yaml (+2/-2)
tests/cloud_tests/testcases/modules/user_groups.py (+6/-0)
tests/cloud_tests/testcases/modules/user_groups.yaml (+5/-2)
tests/unittests/test_handler/test_handler_lxd.py (+8/-8)
tests/unittests/test_handler/test_handler_ntp.py (+12/-11)
tests/unittests/test_handler/test_handler_resizefs.py (+57/-34)
tests/unittests/test_handler/test_schema.py (+36/-1)
tools/read-dependencies (+36/-5)
tools/run-centos (+17/-1)
- Server Team CI bot: Approve (continuous-integration)
- Scott Moser: Pending requested
-
Diff: 1040 lines (+258/-289) 23 files modifiedapicloudinit/config/cc_lxd.py (+1/-1)
cloudinit/config/cc_ntp.py (+3/-1)
cloudinit/config/cc_resizefs.py (+13/-30)
cloudinit/config/cc_users_groups.py (+2/-1)
cloudinit/config/schema.py (+1/-1)
debian/changelog (+14/-0)
debian/patches/series (+0/-1)
dev/null (+0/-181)
doc/examples/cloud-config-user-groups.txt (+3/-3)
tests/cloud_tests/testcases/__init__.py (+7/-0)
tests/cloud_tests/testcases/base.py (+8/-4)
tests/cloud_tests/testcases/examples/including_user_groups.py (+6/-0)
tests/cloud_tests/testcases/examples/including_user_groups.yaml (+5/-2)
tests/cloud_tests/testcases/main/command_output_simple.py (+16/-0)
tests/cloud_tests/testcases/modules/ntp.yaml (+2/-2)
tests/cloud_tests/testcases/modules/user_groups.py (+6/-0)
tests/cloud_tests/testcases/modules/user_groups.yaml (+5/-2)
tests/unittests/test_handler/test_handler_lxd.py (+8/-8)
tests/unittests/test_handler/test_handler_ntp.py (+12/-11)
tests/unittests/test_handler/test_handler_resizefs.py (+57/-34)
tests/unittests/test_handler/test_schema.py (+36/-1)
tools/read-dependencies (+36/-5)
tools/run-centos (+17/-1)
- Server Team CI bot: Approve (continuous-integration)
- Scott Moser: Pending requested
-
Diff: 1042 lines (+258/-289) 23 files modifiedapicloudinit/config/cc_lxd.py (+1/-1)
cloudinit/config/cc_ntp.py (+3/-1)
cloudinit/config/cc_resizefs.py (+13/-30)
cloudinit/config/cc_users_groups.py (+2/-1)
cloudinit/config/schema.py (+1/-1)
debian/changelog (+14/-0)
debian/patches/series (+0/-1)
dev/null (+0/-181)
doc/examples/cloud-config-user-groups.txt (+3/-3)
tests/cloud_tests/testcases/__init__.py (+7/-0)
tests/cloud_tests/testcases/base.py (+8/-4)
tests/cloud_tests/testcases/examples/including_user_groups.py (+6/-0)
tests/cloud_tests/testcases/examples/including_user_groups.yaml (+5/-2)
tests/cloud_tests/testcases/main/command_output_simple.py (+16/-0)
tests/cloud_tests/testcases/modules/ntp.yaml (+2/-2)
tests/cloud_tests/testcases/modules/user_groups.py (+6/-0)
tests/cloud_tests/testcases/modules/user_groups.yaml (+5/-2)
tests/unittests/test_handler/test_handler_lxd.py (+8/-8)
tests/unittests/test_handler/test_handler_ntp.py (+12/-11)
tests/unittests/test_handler/test_handler_resizefs.py (+57/-34)
tests/unittests/test_handler/test_schema.py (+36/-1)
tools/read-dependencies (+36/-5)
tools/run-centos (+17/-1)
- Scott Moser: Approve
- Joshua Powers (community): Approve
- Server Team CI bot: Approve (continuous-integration)
-
Diff: 127 lines (+53/-15) 4 files modifiedapicloudinit/config/cc_ntp.py (+3/-1)
tests/cloud_tests/testcases/modules/ntp.yaml (+2/-2)
tests/unittests/test_handler/test_handler_ntp.py (+12/-11)
tests/unittests/test_handler/test_schema.py (+36/-1)
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!".
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!".
Hello Chad, or anyone else affected,
Accepted cloud-init into artful-proposed. The package will build now and be available at https:/
Please help us by testing this new package. See https:/
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-
Further information regarding the verification process can be found at https:/
Hello Chad, or anyone else affected,
Accepted cloud-init into zesty-proposed. The package will build now and be available at https:/
Please help us by testing this new package. See https:/
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-
Further information regarding the verification process can be found at https:/
Hello Chad, or anyone else affected,
Accepted cloud-init into xenial-proposed. The package will build now and be available at https:/
Please help us by testing this new package. See https:/
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-
Further information regarding the verification process can be found at https:/
xenial START --------------
creating xenial-
[sudo] password for csmith:
--proposed --
...
Get:1 http://
...
{
"v1": {
"datasource": "DataSourceNoCloud [seed=/
"errors": []
}
}
ntp 1:4.2.8p4+
# on 2011年02月08日 (LP: #104525). See http://
# pools
pool 0.ubuntu.
pool 1.ubuntu.
pool 2.ubuntu.
pool 3.ubuntu.
# pool ntp.ubuntu.com
# Needed for adding pool entries
Creating zesty-proposed-
--proposed --
...
Get:1 http://
...
{
"v1": {
"datasource": "DataSourceNoCloud [seed=/
"errors": []
}
}
ntp 1:4.2.8p9+
# on 2011年02月08日 (LP: #104525). See http://
# pools
pool 0.ubuntu.
pool 1.ubuntu.
pool 2.ubuntu.
pool 3.ubuntu.
# pool ntp.ubuntu.com
# Needed for adding pool entries
artful START --------------
Creating artful-
...
Get:1 http://
...
{
"v1": {
"datasource": "DataSourceNoCloud [seed=/
"errors": []
}
}
ntp 1:4.2.8p10+
# on 2011年02月08日 (LP: #104525). See http://
# pools
pool 0.ubuntu.
pool 1.ubuntu.
pool 2.ubuntu.
pool 3.ubuntu.
# pool ntp.ubuntu.com
# Needed for adding pool entries
=== End Abridged SRU verifcation output ===
removed: verification-needed verification-needed-artful verification-needed-xenial verification-needed-zesty
This bug was fixed in the package cloud-init - 17.1-25-
---------------
cloud-init (17.1-25-
* 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> 2017年10月23日 15:07:35 -0600
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.
Hello Chad, or anyone else affected,
Accepted cloud-init into zesty-proposed. The package will build now and be available at https:/
Please help us by testing this new package. See https:/
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-
Further information regarding the verification process can be found at https:/
removed: verification-done verification-done-zesty
Hello Chad, or anyone else affected,
Accepted cloud-init into xenial-proposed. The package will build now and be available at https:/
Please help us by testing this new package. See https:/
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-
Further information regarding the verification process can be found at https:/
removed: verification-done-xenial
=== Abridged SRU verifcation output ===
$ for release in xenial zesty artful; do
> ref=$release-
> echo "$release START --------------";
> lxc-proposed-
> 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-
> lxc exec test-$release -- dpkg-query --show ntp;
> lxc exec test-$release -- grep pool /etc/ntp.conf
> done
xenial START --------------
Creating xenial-
...
Get:1 http://
Creating test-xenial
{
"v1": {
"datasource": "DataSourceNoCloud [seed=/
"errors": []
}
}
ntp 1:4.2.8p4+
# on 2011年02月08日 (LP: #104525). See http://
# pools
pool 0.ubuntu.
pool 1.ubuntu.
pool 2.ubuntu.
pool 3.ubuntu.
# pool ntp.ubuntu.com
# Needed for adding pool entries
zesty START --------------
Creating zesty-proposed-
...
Get:1 http://
...
Creating test-zesty
{
"v1": {
"datasource": "DataSourceNoCloud [seed=/
"errors": []
}
}
ntp 1:4.2.8p9+
# on 2011年02月08日 (LP: #104525). See http://
# pools
pool 0.ubuntu.
pool 1.ubuntu.
pool 2.ubuntu.
pool 3.ubuntu.
# pool ntp.ubuntu.com
# Needed for adding pool entries
artful START --------------
Creating artful-
...
Get:1 http://
...
Creating test-artful
{
"v1": {
"datasource": "DataSourceNoCloud [seed=/
"errors": []
}
}
ntp 1:4.2.8p10+
# on 2011年02月08日 (LP: #104525). See http://
# pools
pool 0.ubuntu.
pool 1.ubuntu.
pool 2.ubuntu.
pool 3.ubuntu.
# pool ntp.ubuntu.com
# Needed for adding pool entries
=== End Abridged SRU verifcation output ===
removed: verification-needed verification-needed-xenial verification-needed-zesty
This bug was fixed in the package cloud-init - 17.1-27-
---------------
cloud-init (17.1-27-
* 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-
* 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-
* cherry-pick 41152f1: schema: Log debug instead of warning when
jsonschema is absent (LP: #1724354)
cloud-init (17.1-18-
* drop the following cherry picks, now incorporated in snapshot.
+ debian/
* 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/
* 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-
[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/
- systemd: only mention Before=
[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_
[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.
[...
This bug was fixed in the package cloud-init - 17.1-27-
---------------
cloud-init (17.1-27-
* 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-
* 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-
* cherry-pick 41152f1: schema: Log debug instead of warning when
jsonschema is absent (LP: #1724354)
cloud-init (17.1-18-
* drop the following cherry picks, now incorporated in snapshot.
+ debian/
* 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/
* 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-
[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/
- systemd: only mention Before=
[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_
[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.
...
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.
Tracked in Github Issues as https:/