Bug 1995718 - [External Mode] Script "ceph-external-cluster-details-exporter.py" incompatible with python 2.x
Summary: [External Mode] Script "ceph-external-cluster-details-exporter.py" incompatib...
Keywords:
Status: CLOSED ERRATA
Alias: None
Product: Red Hat OpenShift Data Foundation
Classification: Red Hat Storage
Component: rook
Version: 4.8
Hardware: Unspecified
OS: Unspecified
unspecified
high
Target Milestone: ---
: ODF 4.9.0
Assignee: arun kumar mohan
QA Contact: Sidhant Agrawal
URL:
Whiteboard:
: 1998292 (view as bug list)
Depends On:
Blocks: 1999605
TreeView+ depends on / blocked
 
Reported: 2021-08-19 16:50 UTC by Sidhant Agrawal
Modified: 2023-08-09 17:03 UTC (History)
8 users (show)

Fixed In Version: v4.9.0-158.ci
Doc Type: No Doc Update
Doc Text:
Clone Of:
: 1999605 (view as bug list)
Environment:
Last Closed: 2021-12-13 17:45:28 UTC
Embargoed:


Attachments (Terms of Use)
OCS 4.8.0 script incompatible with python 2.x (54.32 KB, text/plain)
2021-08-19 16:50 UTC, Sidhant Agrawal
no flags Details


Links
System ID Private Priority Status Summary Last Updated
Github rook rook pull 8623 0 None None None 2021-08-31 12:04:35 UTC
Red Hat Product Errata RHSA-2021:5086 0 None None None 2021-12-13 17:46:09 UTC

Description Sidhant Agrawal 2021-08-19 16:50:32 UTC
Created attachment 1815758 [details]
OCS 4.8.0 script incompatible with python 2.x

Description of problem (please be detailed as possible and provide log
snippests):
The script "ceph-external-cluster-details-exporter.py" is incompatible with python 2.x
Following error occurs when trying to run the script with python 2.7.5

---
# python --version
Python 2.7.5

# python ceph-external-cluster-details-exporter.py --rbd-data-pool-name rbd --rgw-endpoint 10.1.8.29:8080 --run-as-user client.test
  File "ceph-external-cluster-details-exporter.py", line 578
    except subprocess.CalledProcessError as exec:
                                               ^
SyntaxError: invalid syntax
---

Version of all relevant components (if applicable):
OCS 4.8.0
Python 2.7.5

Does this issue impact your ability to continue to work with the product
(please explain in detail what is the user impact)?
Yes, the user will not be able to generate JSON output if they don't have python3 on the RHCS cluster node.

Is there any workaround available to the best of your knowledge?
NA

Rate from 1 - 5 the complexity of the scenario you performed that caused this
bug (1 - very simple, 5 - very complex)?
1

Can this issue reproducible?
Yes

Can this issue reproduce from the UI?
No

If this is a regression, please provide more details to justify this:
Yes,
Script from latest OCS 4.7 (GA) works fine
Last known OCS 4.8 internal build version where script used to work with python 2.x - OCS 4.8.0-398.ci

Steps to Reproduce:
1. Install OCS operator
2. Create StorageCluster -> Select External mode -> Download the script
3. Try to run the script using python 2.x version


Actual results:
SyntaxError when running the script with python 2.x

Expected results:
Script should be compatible with python 2.x

Additional info:

Comment 3 Travis Nielsen 2021-08-19 17:06:22 UTC
Python 2 is past end of life and Python 3 has been out for 13 years. From where is the requirement to run with 2.x?

Comment 4 Sidhant Agrawal 2021-08-19 17:27:58 UTC
(In reply to Travis Nielsen from comment #3)
> Python 2 is past end of life and Python 3 has been out for 13 years. From
> where is the requirement to run with 2.x?

Python 2.x support would be required when RHCS 4.x cluster is deployed on RHEL 7.x

Related Bug 1883866
Relevant Note in our current docs[1] for the requirement 

```
Use python instead of python3 if the Red Hat Ceph Storage 4.x cluster is deployed on Red Hat Enterprise Linux 7.x (RHEL 7.x) cluster.

```

[1] https://access.redhat.com/documentation/en-us/red_hat_openshift_container_storage/4.8/html-single/deploying_openshift_container_storage_in_external_mode/index

Comment 5 Travis Nielsen 2021-08-23 16:01:07 UTC
Arun can you take a look?

Comment 6 Travis Nielsen 2021-08-26 19:16:21 UTC
*** Bug 1998292 has been marked as a duplicate of this bug. ***

Comment 7 arun kumar mohan 2021-08-31 12:04:36 UTC
PR up for review: https://github.com/rook/rook/pull/8623

Comment 16 errata-xmlrpc 2021-12-13 17:45:28 UTC
Since the problem described in this bug report should be
resolved in a recent advisory, it has been closed with a
resolution of ERRATA.

For information on the advisory (Moderate: Red Hat OpenShift Data Foundation 4.9.0 enhancement, security, and bug fix update), and where to find the updated
files, follow the link below.

If the solution does not work for you, open a new bug report.

https://access.redhat.com/errata/RHSA-2021:5086


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