ubuntu/centos/debian: get_linux_distro has different behavior than platform.dist
Affects | Status | Importance | Assigned to | Milestone | |
---|---|---|---|---|---|
cloud-init |
Fix Released
|
High
|
Chad Smith |
Bug Description
Recently cloudinit added get_linux_distro to replace platform.dist() functionality.
The behavior returned a tuple on ubuntu that doens't match the platform.dist module.
python3 -c 'from platform import dist; from cloudinit.util import get_linux_distro; print(dist()); print(get_
('Ubuntu', '16.04', 'xenial')
('ubuntu', '16.04', 'x86_64')
This breaks ntp configuration in cloud-init on xenial, which checks
(_name, _version, codename) = util.system_
if codename == "xenial" and not util.system_
...
Also CentOS 7 behavior:
[root@c71 ~]# python -c 'from platform import dist; from cloudinit.util import get_linux_distro; print(dist()); print(get_
('centos', '7.5.1804', 'Core')
('centos', '7', 'x86_64')
Debian stretch:
root@debStretch:~# python -c 'from platform import dist; print(dist(
openSuse 42.3:
sles42:~ # python3 -c 'from platform import dist; print(dist());'
('SuSE', '42.3', 'x86_64')
Related branches
- Server Team CI bot: Approve (continuous-integration)
- Scott Moser: Pending requested
-
Diff: 1095 lines (+657/-91)20 files modifiedcloudinit/config/cc_bootcmd.py (+7/-1)
cloudinit/config/cc_runcmd.py (+5/-0)
cloudinit/config/cc_write_files.py (+6/-1)
cloudinit/event.py (+17/-0)
cloudinit/gpg.py (+42/-10)
cloudinit/sources/__init__.py (+77/-1)
cloudinit/sources/tests/test_init.py (+82/-1)
cloudinit/stages.py (+10/-4)
cloudinit/tests/test_gpg.py (+54/-0)
cloudinit/tests/test_stages.py (+231/-0)
cloudinit/tests/test_util.py (+68/-1)
cloudinit/util.py (+18/-10)
debian/changelog (+17/-0)
dev/null (+0/-49)
doc/examples/cloud-config-run-cmds.txt (+4/-1)
doc/examples/cloud-config.txt (+4/-1)
doc/rtd/topics/format.rst (+1/-1)
integration-requirements.txt (+1/-1)
tests/unittests/test_datasource/test_azure_helper.py (+3/-1)
tools/run-container (+10/-8)
- Server Team CI bot: Approve (continuous-integration)
- Scott Moser: Pending requested
-
Diff: 1095 lines (+657/-91)20 files modifiedcloudinit/config/cc_bootcmd.py (+7/-1)
cloudinit/config/cc_runcmd.py (+5/-0)
cloudinit/config/cc_write_files.py (+6/-1)
cloudinit/event.py (+17/-0)
cloudinit/gpg.py (+42/-10)
cloudinit/sources/__init__.py (+77/-1)
cloudinit/sources/tests/test_init.py (+82/-1)
cloudinit/stages.py (+10/-4)
cloudinit/tests/test_gpg.py (+54/-0)
cloudinit/tests/test_stages.py (+231/-0)
cloudinit/tests/test_util.py (+68/-1)
cloudinit/util.py (+18/-10)
debian/changelog (+17/-0)
dev/null (+0/-49)
doc/examples/cloud-config-run-cmds.txt (+4/-1)
doc/examples/cloud-config.txt (+4/-1)
doc/rtd/topics/format.rst (+1/-1)
integration-requirements.txt (+1/-1)
tests/unittests/test_datasource/test_azure_helper.py (+3/-1)
tools/run-container (+10/-8)
- Server Team CI bot: Approve (continuous-integration)
- Scott Moser: Pending requested
-
Diff: 1095 lines (+657/-91)20 files modifiedcloudinit/config/cc_bootcmd.py (+7/-1)
cloudinit/config/cc_runcmd.py (+5/-0)
cloudinit/config/cc_write_files.py (+6/-1)
cloudinit/event.py (+17/-0)
cloudinit/gpg.py (+42/-10)
cloudinit/sources/__init__.py (+77/-1)
cloudinit/sources/tests/test_init.py (+82/-1)
cloudinit/stages.py (+10/-4)
cloudinit/tests/test_gpg.py (+54/-0)
cloudinit/tests/test_stages.py (+231/-0)
cloudinit/tests/test_util.py (+68/-1)
cloudinit/util.py (+18/-10)
debian/changelog (+17/-0)
dev/null (+0/-49)
doc/examples/cloud-config-run-cmds.txt (+4/-1)
doc/examples/cloud-config.txt (+4/-1)
doc/rtd/topics/format.rst (+1/-1)
integration-requirements.txt (+1/-1)
tests/unittests/test_datasource/test_azure_helper.py (+3/-1)
tools/run-container (+10/-8)
- Server Team CI bot: Approve (continuous-integration)
- Scott Moser: Pending requested
-
Diff: 1094 lines (+656/-91)20 files modifiedcloudinit/config/cc_bootcmd.py (+7/-1)
cloudinit/config/cc_runcmd.py (+5/-0)
cloudinit/config/cc_write_files.py (+6/-1)
cloudinit/event.py (+17/-0)
cloudinit/gpg.py (+42/-10)
cloudinit/sources/__init__.py (+77/-1)
cloudinit/sources/tests/test_init.py (+82/-1)
cloudinit/stages.py (+10/-4)
cloudinit/tests/test_gpg.py (+54/-0)
cloudinit/tests/test_stages.py (+231/-0)
cloudinit/tests/test_util.py (+68/-1)
cloudinit/util.py (+18/-10)
debian/changelog (+16/-0)
dev/null (+0/-49)
doc/examples/cloud-config-run-cmds.txt (+4/-1)
doc/examples/cloud-config.txt (+4/-1)
doc/rtd/topics/format.rst (+1/-1)
integration-requirements.txt (+1/-1)
tests/unittests/test_datasource/test_azure_helper.py (+3/-1)
tools/run-container (+10/-8)
- Server Team CI bot: Approve (continuous-integration)
- Scott Moser: Approve
-
Diff: 151 lines (+89/-12)3 files modifiedcloudinit/tests/test_util.py (+68/-1)
cloudinit/util.py (+18/-10)
tests/unittests/test_datasource/test_azure_helper.py (+3/-1)
summary: |
- ubuntu/centos: get_linux_distro has differnet behavior than + ubuntu/centos/debian: get_linux_distro has different behavior than platform.dist |
Changed in cloud-init: | |
assignee: | nobody → Chad Smith (chad.smith) |
status: | New → Triaged |
importance: | Undecided → High |
tags: | added: regression-proposed |
tags: | added: verification-needed verification-needed-artful verification-needed-bionic verification-needed-xenial |
This bug is fixed with commit c1a75a69 to cloud-init on branch master. /git.launchpad. net/cloud- init/commit/ ?id=c1a75a69
To view that commit see the following URL:
https:/