yahoo-eng-team team mailing list archive
-
yahoo-eng-team team
-
Mailing list archive
-
Message #75079
[Bug 1787459] Re: datasource.sys_cfg gets different values in local stage and after.
This bug was fixed in the package cloud-init - 18.4-0ubuntu1
---------------
cloud-init (18.4-0ubuntu1) cosmic; urgency=medium
* New upstream release.
- release 18.4 (LP: #1795741)
- tests: allow skipping an entire cloud_test without running.
- tests: disable lxd tests on cosmic
- cii-tests: use unittest2.SkipTest in ntp_chrony due to new deps
- lxd: adjust to snap installed lxd.
- docs: surface experimental doc in instance-data.json
- tests: fix ec2 integration tests. process meta_data instead of meta-data
- Add support for Infiniband network interfaces (IPoIB). [Mark Goddard]
- cli: add cloud-init query subcommand to query instance metadata
- tools/tox-venv: update for new features.
- pylint: ignore warning assignment-from-no-return for _write_network
- stages: Fix bug causing datasource to have incorrect sys_cfg.
(LP: #1787459)
- Remove dead-code _write_network distro implementations.
- net_util: ensure static configs have netmask in translate_network result
[Thomas Berger] (LP: #1792454)
- Fall back to root:root on syslog permissions if other options fail.
[Robert Schweikert]
- tests: Add mock for util.get_hostname. [Robert Schweikert] (LP: #1792799)
-- Chad Smith <chad.smith@xxxxxxxxxxxxx> Tue, 02 Oct 2018 19:55:23
-0600
** Changed in: cloud-init (Ubuntu)
Status: Confirmed => Fix Released
--
You received this bug notification because you are a member of Yahoo!
Engineering Team, which is subscribed to cloud-init.
https://bugs.launchpad.net/bugs/1787459
Title:
datasource.sys_cfg gets different values in local stage and after.
Status in cloud-init:
Fix Released
Status in cloud-init package in Ubuntu:
Fix Released
Bug description:
When a datasource is instantiated it is passed in Init.cfg as the 'sys_cfg'.
But then when 'distro' property is referenced, it has the side effect
of:
system_config = self._extract_cfg('system')
if self.datasource is not NULL_DATA_SOURCE:
self.datasource.distro = self._distro
self.datasource.sys_cfg = system_config
Here we see the problem demonstrated.
root@c1:~# cat show-syscfg-keys
#!/usr/bin/python3
from cloudinit.stages import _pkl_load;
print(_pkl_load("/var/lib/cloud/instance/obj.pkl").sys_cfg.keys())
root@c1:~# cloud-init clean --logs
root@c1:~# cloud-init init --local
Cloud-init v. 18.3-18-g3cee0bf8-0ubuntu1 running 'init-local' at Thu, 16 Aug 2018 18:08:00 +0000. Up 574.00 seconds.
root@c1:~# python3 show-syscfg-keys
dict_keys(['datasource_list', '_log', 'log_cfgs', 'output', 'users', 'disable_root', 'preserve_hostname', 'cloud_init_modules', 'cloud_config_modules', 'cloud_final_modules', 'def_log_file', 'syslog_fix_perms', 'vendor_data'])
root@c1:~#
root@c1:~#
root@c1:~# cloud-init init >/dev/null 2>&1
Cloud-init v. 18.3-18-g3cee0bf8-0ubuntu1 running 'init' at Thu, 16 Aug 2018 18:08:11 +0000. Up 585.00 seconds.
...
root@c1:~# python3 show-syscfg-keys
dict_keys(['default_user', 'ntp_client', 'paths', 'package_mirrors', 'ssh_svcname', 'network'])
ProblemType: Bug
DistroRelease: Ubuntu 18.10
Package: cloud-init 18.3-18-g3cee0bf8-0ubuntu1
ProcVersionSignature: Ubuntu 4.17.0-6.7-generic 4.17.9
Uname: Linux 4.17.0-6-generic x86_64
ApportVersion: 2.20.10-0ubuntu7
Architecture: amd64
CloudName: LXD
Date: Thu Aug 16 18:02:03 2018
PackageArchitecture: all
ProcEnviron:
TERM=xterm-256color
PATH=(custom, no user)
LANG=C.UTF-8
SourcePackage: cloud-init
UpgradeStatus: No upgrade log present (probably fresh install)
To manage notifications about this bug go to:
https://bugs.launchpad.net/cloud-init/+bug/1787459/+subscriptions
References