Public bug reported: 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) ** Affects: cloud-init Importance: Medium Status: Confirmed ** Affects: cloud-init (Ubuntu) Importance: Medium Status: Confirmed ** Tags: amd64 apport-bug cosmic uec-images ** Also affects: cloud-init Importance: Undecided Status: New ** Changed in: cloud-init Status: New => Confirmed ** Changed in: cloud-init (Ubuntu) Status: New => Confirmed ** Changed in: cloud-init Importance: Undecided => Medium ** Changed in: cloud-init (Ubuntu) Importance: Undecided => Medium -- You received this bug notification because you are a member of Ubuntu Bugs, which is subscribed to Ubuntu. https://bugs.launchpad.net/bugs/1787459 Title: datasource.sys_cfg gets different values in local stage and after. To manage notifications about this bug go to: https://bugs.launchpad.net/cloud-init/+bug/1787459/+subscriptions -- ubuntu-bugs mailing list ubuntu-bugs@lists.ubuntu.com https://lists.ubuntu.com/mailman/listinfo/ubuntu-bugs