Bug 1998292 - ceph-external-cluster-details-exporter.py script does not run under Python 2
Summary: ceph-external-cluster-details-exporter.py script does not run under Python 2
Keywords:
Status: CLOSED DUPLICATE of bug 1995718
Alias: None
Product: Red Hat OpenShift Data Foundation
Classification: Red Hat Storage
Component: rook
Version: 4.8
Hardware: Unspecified
OS: Unspecified
unspecified
unspecified
Target Milestone: ---
: ---
Assignee: Travis Nielsen
QA Contact: Elad
URL:
Whiteboard:
Depends On:
Blocks:
TreeView+ depends on / blocked
 
Reported: 2021-08-26 18:44 UTC by Lars Kellogg-Stedman
Modified: 2023-08-09 17:03 UTC (History)
3 users (show)

Fixed In Version:
Doc Type: If docs needed, set a value
Doc Text:
Clone Of:
Environment:
Last Closed: 2021-08-26 19:16:21 UTC
Embargoed:


Attachments (Terms of Use)

Description Lars Kellogg-Stedman 2021-08-26 18:44:53 UTC
The `ceph-external-cluster-details-exporter.py` script needs to run under Python2 to support systems that are still running RHEL 7, but it contains Python3 only syntax.  For example, at line 568:

        try:
            output = subprocess.check_output(cmd,
                                             stderr=subprocess.PIPE)
        except subprocess.CalledProcessError as exec:

In Python 2 (2.7.5), `exec` is a reserved word and can't be used like this; the above line results in:

      File "ceph-external-cluster-details-exporter.py", line 578
        except subprocess.CalledProcessError as exec:
                                                   ^
    SyntaxError: invalid syntax

Comment 2 Travis Nielsen 2021-08-26 19:16:21 UTC

*** This bug has been marked as a duplicate of bug 1995718 ***


Note You need to log in before you can comment on or make changes to this bug.