Bug #18163
closedplatform.linux_distribution() is deprecated; stop using it
0%
Description
platform.linux_distribution() is deprecated, so we should stop using it. Notably it uses /etc/SuSE-release on SUSE systems, and the latest SUSE versions don't ship this file; instead they ship /etc/os-release, which platform.linux_distribution() doesn't know about, so it returns ('','','').
AFAICT, platform.linux_distribution() is currently used by ceph-detect-init, which in turn is used by ceph-disk. If ceph-detect-init can't determine the distro because it sees ('','',''), this results in ceph-disk always tagging the init system as sysvinit.
There are also platform.linux_distribution() invocations in qa/workunits/ceph-disk/ceph-disk-no-lockbox and src/ceph-disk/ceph_disk/main.py, but they look like dead code to me.
See also bug #18141
Updated by Nathan Cutler over 7 years ago
lsb-release is no longer a Ceph runtime dependency, but is still a Ceph build dependency - see #17425
Getting rid of lsb-release as a build dependency is a laudable goal IMO and dropping all calls to platform.linux_distribution() is a part of that.
Updated by Sage Weil over 7 years ago
- Status changed from Resolved to 12
oops, ceph-detect-init is still using it.
Updated by Nathan Cutler about 6 years ago
- Has duplicate Bug #23781: ceph-detect-init still uses python's platform lib added
Updated by Nathan Cutler about 6 years ago
- Status changed from 12 to Fix Under Review
- Assignee set to Nathan Cutler
This bug is no longer applicable to master, because ceph-detect-init has been dropped there.
mimic PR: https://github.com/ceph/ceph/pull/21523
Updated by Nathan Cutler almost 6 years ago
first mimic follow-on PR (not a regression - just expands coverage): https://github.com/ceph/ceph/pull/23111
Updated by Yuri Weinstein almost 6 years ago
Nathan Cutler wrote:
This bug is no longer applicable to master, because ceph-detect-init has been dropped there.
mimic PR: https://github.com/ceph/ceph/pull/21523
merged
Updated by Nathan Cutler over 5 years ago
second mimic follow-on PR (fix RHEL 7.5 regression): https://github.com/ceph/ceph/pull/23303
Updated by Nathan Cutler over 5 years ago
- Backport changed from mimic,luminous to luminous
Updated by Nathan Cutler about 5 years ago
- Status changed from Fix Under Review to Pending Backport
Updated by Nathan Cutler about 5 years ago
- Copied to Backport #39277: luminous: platform.linux_distribution() is deprecated; stop using it added
Updated by Nathan Cutler over 4 years ago
- Status changed from Pending Backport to Resolved
While running with --resolve-parent, the script "backport-create-issue" noticed that all backports of this issue are in status "Resolved".