Public bug reported:
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_linux_distro())'
('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_info()['dist']
if codename == "xenial" and not util.system_is_snappy():
...
Also CentOS 7 behavior:
[root@c71 ~]# python -c 'from platform import dist; from cloudinit.util import
get_linux_distro; print(dist()); print(get_linux_distro())'
('centos', '7.5.1804', 'Core')
('centos', '7', 'x86_64')
Debian stretch:
root@debStretch:~# python -c 'from platform import dist;
print(dist());'('debian', '9.4', '')
openSuse 42.3:
sles42:~ # python3 -c 'from platform import dist; print(dist());'
('SuSE', '42.3', 'x86_64')
** Affects: cloud-init
Importance: Undecided
Status: New
** Summary changed:
- ubuntu/centos: get_linux_distro has differnet behavior than platform.dist
+ ubuntu/centos/debian: get_linux_distro has different behavior than
platform.dist
--
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/1780481
Title:
ubuntu/centos/debian: get_linux_distro has different behavior than
platform.dist
Status in cloud-init:
New
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_linux_distro())'
('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_info()['dist']
if codename == "xenial" and not util.system_is_snappy():
...
Also CentOS 7 behavior:
[root@c71 ~]# python -c 'from platform import dist; from cloudinit.util
import get_linux_distro; print(dist()); print(get_linux_distro())'
('centos', '7.5.1804', 'Core')
('centos', '7', 'x86_64')
Debian stretch:
root@debStretch:~# python -c 'from platform import dist;
print(dist());'('debian', '9.4', '')
openSuse 42.3:
sles42:~ # python3 -c 'from platform import dist; print(dist());'
('SuSE', '42.3', 'x86_64')
To manage notifications about this bug go to:
https://bugs.launchpad.net/cloud-init/+bug/1780481/+subscriptions
--
Mailing list: https://launchpad.net/~yahoo-eng-team
Post to : [email protected]
Unsubscribe : https://launchpad.net/~yahoo-eng-team
More help : https://help.launchpad.net/ListHelp