Merge ~chad.smith/cloud-init:bug/1780481-fix-get-linux-distro into cloud-init:master
Status: | Merged |
---|---|
Approved by: | Chad Smith |
Approved revision: | 46345394b6d8ec96f13ade59c9fffb2885349ade |
Merge reported by: | Server Team CI bot |
Merged at revision: | not available |
Proposed branch: | ~chad.smith/cloud-init:bug/1780481-fix-get-linux-distro |
Merge into: | cloud-init:master |
Diff against target: |
151 lines (+89/-12) 3 files modified
cloudinit/tests/test_util.py (+68/-1) cloudinit/util.py (+18/-10) tests/unittests/test_datasource/test_azure_helper.py (+3/-1) |
Related bugs: |
Reviewer | Review Type | Date Requested | Status |
---|---|---|---|
Server Team CI bot | continuous-integration | Approve | |
Scott Moser | Approve | ||
Review via email: mp+349081@code.launchpad.net |
Commit message
ubuntu,
A recent commit added get_linux_distro to replace the deprecated python
platform.dist module behavior before it is dropped from python. It added
behavior that was compliant on OpenSuSE and SLES, by returning
(<distro_name>, <distro_version>, <cpu-arch>).
Fix get_linux_distro to behave more like the specific distribution's
platform.dist on ubuntu, centos and debian, which will return the
distribution release codename as the third element instead of <cpu-arch>.
SLES and OpenSUSE will retain their current behavior.
Examples follow:
('sles', '15', 'x86_64')
('opensuse', '42.3', 'x86_64')
('debian', '9', 'stretch')
('ubuntu', '16.04', 'xenial')
('centos', '7', 'Core')
LP: #1780481
LGTM +1