ntp not using expected servers
Affects | Status | Importance | Assigned to | Milestone | |
---|---|---|---|---|---|
cloud-init |
Fix Released
|
Medium
|
Unassigned | ||
cloud-init (Ubuntu) |
Fix Released
|
Medium
|
Thomas Duell | ||
Xenial |
Fix Released
|
Medium
|
Unassigned | ||
Yakkety |
Fix Released
|
Medium
|
Unassigned | ||
Zesty |
Fix Released
|
Medium
|
Unassigned |
Bug Description
=== Begin SRU Template ===
[Impact]
Existing security permissions on /etc/ssh/
[Test Case]
if [ ! -f lxc-proposed-
wget https:/
chmod 755 lxc-proposed-
fi
cat << EOF > config.yaml
#cloud-config
ntp:
pools: [1.ntp.mypool]
servers: [my.server.nonpool]
EOF
for release in xenial yakkety zesty; do
echo "$release START --------------";
lxc init $ref test-$release;
lxc config set test-$release user.user-data - < config.yaml
lxc start test-$release;
sleep 10
# Should not see [0-3].ubuntu.pool.n
lxc exec test-$release -- ntpq -p
echo "$release DONE --------------";
done
[Regression Potential]
Minimal ntp service confguration could be stale if this breaks anything.
It is minimal regression potential as the fix only reorders the creation of /etc/ntp.conf prior to the package intall and adds a call to service ntp restart.
[Other Info]
=== End SRU Template ===
Related bugs:
* bug 1701297: NTP reload failure (unable to read library) on overlayfs
Related branches
- Ryan Harper: Pending requested
-
Diff: 4168 lines (+2525/-393)47 files modifiedMakefile (+9/-5)
cloudinit/cmd/main.py (+150/-16)
cloudinit/config/cc_set_hostname.py (+1/-1)
cloudinit/config/cc_set_passwords.py (+20/-2)
cloudinit/distros/parsers/resolv_conf.py (+7/-4)
cloudinit/distros/rhel.py (+12/-7)
cloudinit/ec2_utils.py (+4/-1)
cloudinit/helpers.py (+2/-0)
cloudinit/net/eni.py (+19/-14)
cloudinit/net/sysconfig.py (+28/-13)
cloudinit/settings.py (+2/-0)
cloudinit/sources/DataSourceAliYun.py (+4/-0)
cloudinit/sources/DataSourceEc2.py (+145/-2)
cloudinit/sources/DataSourceOVF.py (+33/-4)
cloudinit/sources/DataSourceOpenStack.py (+12/-3)
cloudinit/sources/helpers/vmware/imc/config_nic.py (+6/-18)
cloudinit/ssh_util.py (+3/-0)
cloudinit/stages.py (+14/-1)
cloudinit/util.py (+0/-44)
cloudinit/warnings.py (+139/-0)
doc/examples/cloud-config.txt (+1/-1)
doc/rtd/topics/datasources/altcloud.rst (+2/-2)
doc/rtd/topics/datasources/openstack.rst (+35/-1)
doc/rtd/topics/format.rst (+7/-6)
packages/debian/rules.in (+2/-0)
setup.py (+2/-1)
systemd/cloud-init-generator (+37/-2)
tests/unittests/helpers.py (+26/-48)
tests/unittests/test__init__.py (+59/-33)
tests/unittests/test_atomic_helper.py (+2/-2)
tests/unittests/test_data.py (+37/-16)
tests/unittests/test_datasource/test_gce.py (+3/-1)
tests/unittests/test_datasource/test_openstack.py (+5/-6)
tests/unittests/test_distros/test_resolv.py (+1/-1)
tests/unittests/test_distros/test_user_data_normalize.py (+0/-0)
tests/unittests/test_ec2_util.py (+47/-2)
tests/unittests/test_net.py (+233/-45)
tests/unittests/test_sshutil.py (+23/-1)
tools/Z99-cloud-locale-test.sh (+74/-74)
tools/Z99-cloudinit-warnings.sh (+30/-0)
tools/ds-identify (+1252/-0)
tools/make-mime.py (+1/-1)
tools/make-tarball (+1/-1)
tools/mock-meta.py (+25/-12)
tools/read-version (+1/-1)
tools/validate-yaml.py (+1/-1)
tox.ini (+8/-0)
- Server Team CI bot: Needs Fixing (continuous-integration)
- Scott Moser: Needs Fixing
-
Diff: 352 lines (+183/-28)8 files modifiedcloudinit/config/cc_ntp.py (+22/-2)
tests/cloud_tests/configs/modules/ntp_pools.yaml (+6/-4)
tests/cloud_tests/configs/modules/ntp_servers.yaml (+10/-6)
tests/cloud_tests/testcases/modules/ntp.py (+2/-2)
tests/cloud_tests/testcases/modules/ntp_pools.py (+19/-6)
tests/cloud_tests/testcases/modules/ntp_servers.py (+14/-5)
tests/unittests/test_handler/test_handler_ntp.py (+76/-2)
tox.ini (+34/-1)
Changed in cloud-init (Ubuntu): | |
status: | Confirmed → In Progress |
Changed in cloud-init: | |
status: | New → Confirmed |
importance: | Undecided → Medium |
no longer affects: | maas (Ubuntu) |
Changed in cloud-init (Ubuntu Xenial): | |
status: | New → Confirmed |
Changed in cloud-init (Ubuntu Yakkety): | |
status: | New → Confirmed |
importance: | Undecided → Medium |
Changed in cloud-init (Ubuntu Zesty): | |
status: | New → Confirmed |
Changed in cloud-init (Ubuntu Xenial): | |
importance: | Undecided → Medium |
Changed in cloud-init (Ubuntu Zesty): | |
importance: | Undecided → Medium |
Changed in cloud-init: | |
status: | Confirmed → Fix Committed |
description: | updated |
description: | updated |
description: | updated |
Changed in cloud-init (Ubuntu): | |
assignee: | nobody → Thomas Duell (anonnaki30031972) |
[/var/log/ cloud-init. log] config/ config- ntp: running config-ntp with frequency once-per-instance cloud/instances /pdrrwx/ sem/config_ ntp - wb: [420] 25 bytes cloud/instances /pdrrwx/ sem/config_ ntp'>) cloud/instances /pdrrwx/ sem/update_ sources - wb: [420] 25 bytes cloud/instances /pdrrwx/ sem/update_ sources' >) Dpkg::Options: :=--force- confold' , '--option= Dpkg::options: :=--force- unsafe- io', '--assume-yes', '--quiet', 'update'] with allowed return codes [0] (shell=False, capture=False) Dpkg::Options: :=--force- confold --option= Dpkg::options: :=--force- unsafe- io --assume-yes --quiet update] took 2.717 seconds Dpkg::Options: :=--force- confold' , '--option= Dpkg::options: :=--force- unsafe- io', '--assume-yes', '--quiet', 'install', 'ntp'] with allowed return codes [0] (shell=False, capture=False) Dpkg::Options: :=--force- confold --option= Dpkg::options: :=--force- unsafe- io --assume-yes --quiet install ntp] took 5.093 seconds templates/ ntp.conf. ubuntu. tmpl (quiet=False) templates/ ntp.conf. ubuntu. tmpl py[DEBUG] : Rendering content of '/etc/cloud/ templates/ ntp.conf. ubuntu. tmpl' using renderer jinja py[DEBUG] : [0/1] open 'http:// 10.0.0. 1/MAAS/ metadata/ status/ pdrrwx' with {'allow_redirects': True, 'headers': {'Authorization': 'OAuth oauth_nonce= "17413398801458 867451148034170 2", oauth_timestamp ="1480341702" , oauth_version= "1.0", oauth_signature _method= "PLAINTEXT" , oauth_consumer_ key="hSstLrMK5Q NpvSBdna" , oauth_token= "hUhc5cBa9eeekk Ne3y", oauth_signature ="%26wqdhtxdzRQ cADcSMNmSVQtAjH XwgzKJX" '}, 'method': 'POST', 'url': 'http:// 10.0.0. 1/MAAS/ metadata/ status/ pdrrwx'} configuration py[DEBUG] : Read from http:// 10.0.0. 1/MAAS/ metadata/ status/ pdrrwx (200, 2b) after 1 attempts config/ config- ntp: SUCCESS: config-ntp ran successfully
Nov 28 14:01:34 ubuntu [CLOUDINIT] handlers.py[DEBUG]: start: modules-
Nov 28 14:01:34 ubuntu [CLOUDINIT] util.py[DEBUG]: Writing to /var/lib/
Nov 28 14:01:34 ubuntu [CLOUDINIT] helpers.py[DEBUG]: Running config-ntp using lock (<FileLock using file '/var/lib/
Nov 28 14:01:34 ubuntu [CLOUDINIT] util.py[DEBUG]: Writing to /var/lib/
Nov 28 14:01:34 ubuntu [CLOUDINIT] helpers.py[DEBUG]: Running update-sources using lock (<FileLock using file '/var/lib/
Nov 28 14:01:34 ubuntu [CLOUDINIT] util.py[DEBUG]: Running command ['eatmydata', 'apt-get', '--option=
Nov 28 14:01:37 ubuntu [CLOUDINIT] util.py[DEBUG]: apt-update [eatmydata apt-get --option=
Nov 28 14:01:37 ubuntu [CLOUDINIT] util.py[DEBUG]: Running command ['eatmydata', 'apt-get', '--option=
Nov 28 14:01:42 ubuntu [CLOUDINIT] util.py[DEBUG]: apt-install [eatmydata apt-get --option=
Nov 28 14:01:42 ubuntu [CLOUDINIT] util.py[DEBUG]: Renaming /etc/ntp.conf to /etc/ntp.conf.dist
Nov 28 14:01:42 ubuntu [CLOUDINIT] util.py[DEBUG]: Reading from /etc/cloud/
Nov 28 14:01:42 ubuntu [CLOUDINIT] util.py[DEBUG]: Read 2509 bytes from /etc/cloud/
Nov 28 14:01:42 ubuntu [CLOUDINIT] templater.
Nov 28 14:01:42 ubuntu [CLOUDINIT] util.py[DEBUG]: Writing to /etc/ntp.conf - wb: [420] 2329 bytes
Nov 28 14:01:42 ubuntu [CLOUDINIT] url_helper.
Nov 28 14:01:42 ubuntu [CLOUDINIT] url_helper.
Nov 28 14:01:42 ubuntu [CLOUDINIT] handlers.py[DEBUG]: finish: modules-