platform.linux_distribution has been removed from Python3.8
Affects | Status | Importance | Assigned to | Milestone | |
---|---|---|---|---|---|
ceph-deploy (Ubuntu) |
Invalid
|
Undecided
|
Unassigned | ||
Focal |
Fix Released
|
High
|
James Page |
Bug Description
[Impact]
ceph-deploy is not usable with Python >= 3.8 as found in Ubuntu Focal.
[Test Case]
Initialise ceph deployment using ceph-deploy using Ubuntu 20.04 LTS machines
Errors with "RuntimeError: AttributeError: module 'platform' has no attribute 'linux_
[Where problems could occur]
The commit that fixes this issue is typically Pythonic and should have both good forwards and backwards compatiblity; its accepted upstream and present in later releases (2.1.0).
[Original Bug Report]
Running ceph-deploy in focal, using python3.8, results in an error message:
[ceph_deploy][ERROR ] RuntimeError: AttributeError: module 'platform' has no attribute 'linux_
It turns out platform.
(bpo-28167: Remove platform.
One option may be to use the new distro module from https:/
As ceph-deploy already can use os-release as a fall-back option, I changed ceph-deploy to use that as the first option and could create a working ceph cluster.
--- /usr/lib/
+++ /usr/lib/
@@ -13,10 +13,10 @@
def platform_
""" detect platform information from remote host """
- linux_distribution = _linux_distribution or platform.
- distro, release, codename = linux_distribut
- if not distro:
- distro, release, codename = parse_os_release()
+ #linux_distribution = _linux_distribution or platform.
+ #distro, release, codename = linux_distribut
+ #if not distro:
+ distro, release, codename = parse_os_release()
if not codename and 'debian' in distro.lower(): # this could be an empty string in Debian
'10': 'buster',
Changed in ceph-deploy (Ubuntu): | |
status: | Confirmed → Invalid |
description: | updated |
Changed in ceph-deploy (Ubuntu Focal): | |
status: | New → Triaged |
importance: | Undecided → High |
assignee: | nobody → James Page (james-page) |
status: | Triaged → In Progress |
description: | updated |
Status changed to 'Confirmed' because the bug affects multiple users.