datasource.sys_cfg gets different values in local stage and after.
Affects | Status | Importance | Assigned to | Milestone | |
---|---|---|---|---|---|
cloud-init |
Fix Released
|
Medium
|
Scott Moser | ||
cloud-init (Ubuntu) |
Fix Released
|
Medium
|
Unassigned |
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:
if self.datasource is not NULL_DATA_SOURCE:
Here we see the problem demonstrated.
root@c1:~# cat show-syscfg-keys
#!/usr/bin/python3
from cloudinit.stages import _pkl_load;
print(_
root@c1:~# cloud-init clean --logs
root@c1:~# cloud-init init --local
Cloud-init v. 18.3-18-
root@c1:~# python3 show-syscfg-keys
dict_keys(
root@c1:~#
root@c1:~#
root@c1:~# cloud-init init >/dev/null 2>&1
Cloud-init v. 18.3-18-
...
root@c1:~# python3 show-syscfg-keys
dict_keys(
ProblemType: Bug
DistroRelease: Ubuntu 18.10
Package: cloud-init 18.3-18-
ProcVersionSign
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
PackageArchitec
ProcEnviron:
TERM=xterm-
PATH=(custom, no user)
LANG=C.UTF-8
SourcePackage: cloud-init
UpgradeStatus: No upgrade log present (probably fresh install)
Related branches
- Server Team CI bot: Approve (continuous-integration)
- Chad Smith: Approve
-
Diff: 13 lines (+1/-1)1 file modifiedcloudinit/stages.py (+1/-1)
Changed in cloud-init: | |
assignee: | nobody → Scott Moser (smoser) |
This bug is fixed with commit f0ff1940 to cloud-init on branch master. /git.launchpad. net/cloud- init/commit/ ?id=f0ff1940
To view that commit see the following URL:
https:/