crm cluster health uses platform.linux_distribution, dropped in python 3.8

Bug #1947022 reported by Athos Ribeiro
8
This bug affects 1 person
Affects Status Importance Assigned to Milestone
crmsh (Ubuntu)
Fix Released
Low
Athos Ribeiro

Bug Description

scripts/health/collect.py relies on a call to platform.linux_distribution, which has been deprecated since Python 3.5 and was removed on python 3.8 [1].

This results in errors for "crm cluster health" calls on systems with python >= 3.8, i.e., Ubuntu >= 20.04 (focal).

[1] https://bugs.python.org/issue28167

Tags: server-todo

Related branches

Revision history for this message
Athos Ribeiro (athos-ribeiro) wrote :
Revision history for this message
Athos Ribeiro (athos-ribeiro) wrote :

This bug was filed while triaging https://bugs.launchpad.net/ubuntu/+source/crmsh/+bug/1687095. Therefore, I am changing the importance to low, to match that bug's importance.

Changed in crmsh (Ubuntu):
importance: Undecided → Low
Changed in crmsh (Ubuntu):
status: New → Triaged
Revision history for this message
Lucas Kanashiro (lucaskanashiro) wrote :

This is still not fixed upstream. This is the PR containing the fix:

https://github.com/ClusterLabs/crmsh/pull/883

Revision history for this message
Athos Ribeiro (athos-ribeiro) wrote :

This has landed upstream, but has not been released yet.

Since there is a feature change in the fixing PR, I am not sure backporting it would be fit for an SRU. One alternative would be to replicate the utillib.get_distro_info() behavior in scripts/health/collect.py to substitute the deprecated command. This would mimic the behavior change applied upstream. While this would introduce a change in the data presented by the failing command (it would remove 2 fields from it), it seems reasonable given that currently, the command does not work at all for series >= 20.04.

tags: added: server-todo
Changed in crmsh (Ubuntu):
assignee: nobody → Athos Ribeiro (athos-ribeiro)
Revision history for this message
Launchpad Janitor (janitor) wrote :

This bug was fixed in the package crmsh - 4.2.1-3ubuntu2

---------------
crmsh (4.2.1-3ubuntu2) jammy; urgency=medium

  * New changes:
    - d/p/0017-Fix-health-scripts-python-38-support.patch: remove deprecated
      function usage (LP: #1947022).
    - d/p/0018-Replace-crmd.patch: replace crmd calls with pacemaker-controld
      (LP: #1958241).
    - d/t/testsuite.sh: set timezone for time conversion tests (LP: #1958243).
    - d/p/0019-Add-hb_report-dpkg-support.patch: add dpkg support to hb_report
      (LP: #1958246).
    - d/p/0020-Use-crmsh-hb_report.patch: use the crmsh shipped hb_report script
      when available (LP: #1958247).

 -- Athos Ribeiro <email address hidden> Fri, 07 Jan 2022 10:14:32 -0300

Changed in crmsh (Ubuntu):
status: Triaged → Fix Released
To post a comment you must log in.
This report contains Public information  
Everyone can see this information.

Other bug subscribers

Remote bug watches

Bug watches keep track of this bug in other bug trackers.