Bug 2089137
| Summary: | "ceph-external-cluster-details-exporter.py" ( 4.11 ) incompatible with python 2.x | ||
|---|---|---|---|
| Product: | [Red Hat Storage] Red Hat OpenShift Data Foundation | Reporter: | Vijay Avuthu <vavuthu> |
| Component: | rook | Assignee: | Parth Arora <paarora> |
| Status: | CLOSED WONTFIX | QA Contact: | Shivam Durgbuns <sdurgbun> |
| Severity: | medium | Docs Contact: | |
| Priority: | unspecified | ||
| Version: | 4.11 | CC: | amohan, bkunal, clacroix, ebenahar, kramdoss, mbukatov, muagarwa, ocs-bugs, odf-bz-bot, paarora, pbalogh, rcyriac, sdurgbun, srai, tnielsen |
| Target Milestone: | --- | Flags: | paarora:
needinfo-
kramdoss: needinfo+ kramdoss: needinfo+ kramdoss: needinfo+ |
| Target Release: | --- | ||
| Hardware: | Unspecified | ||
| OS: | Unspecified | ||
| Whiteboard: | |||
| Fixed In Version: | Doc Type: | Bug Fix | |
| Doc Text: |
RHEL 7.x cluster has a dependency to run the external script with python2, so make the external script compatible so it can run with python2.
|
Story Points: | --- |
| Clone Of: | Environment: | ||
| Last Closed: | 2023-04-28 07:14:21 UTC | Type: | Bug |
| Regression: | --- | Mount Type: | --- |
| Documentation: | --- | CRM: | |
| Verified Versions: | Category: | --- | |
| oVirt Team: | --- | RHEL 7.3 requirements from Atomic Host: | |
| Cloudforms Team: | --- | Target Upstream Version: | |
| Embargoed: | |||
|
Description
Vijay Avuthu
2022-05-23 06:07:13 UTC
``` from inspect import signature ``` signature is not present in python 2.x we can use ```from funcsigs import signature``` for python 2.x one question, since python 2.x is EOL, till when we are planning to support python 2.x? (In reply to Subham Rai from comment #2) > one question, since python 2.x is EOL, till when we are planning to support > python 2.x? The documentation states that one should use python3, with an exception of rhel7: > 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. Also, will QE need help in testing since we don't have the required setup. Thanks (In reply to Subham Rai from comment #4) > Also, will need QE help in testing since we don't have the required setup. > Thanks Please backport the fix to 4.11 (In reply to Mudit Agarwal from comment #8) > Please backport the fix to 4.11 added In verifying this bug I'm seeing another ImportError: 2022-08-22 11:25:06 18:25:06 - MainThread - ocs_ci.utility.connection - INFO - Executing cmd: python /tmp/external-cluster-details-exporter-81d5q9qq.py --rbd-data-pool-name rbd --rgw-endpoint 10.70.39.7:8080 on 10.70.39.4 2022-08-22 11:25:07 18:25:07 - MainThread - ocs_ci.deployment.helpers.external_cluster_helpers - ERROR - Failed to run /tmp/external-cluster-details-exporter-81d5q9qq.py with parameters --rbd-data-pool-name rbd --rgw-endpoint 10.70.39.7:8080. Error: Traceback (most recent call last): 2022-08-22 11:25:07 File "/tmp/external-cluster-details-exporter-81d5q9qq.py", line 29, in <module> 2022-08-22 11:25:07 import urllib.parse 2022-08-22 11:25:07 ImportError: No module named parse This is from line 29 and the original error is line 18 so it looks like the original error has been resolved however we still can't execute the exporter script due to this. Version: quay.io/rhceph-dev/ocs-registry:4.11.0-137 Job: https://ocs4-jenkins-csb-odf-qe.apps.ocp-c1.prod.psi.redhat.com/job/qe-deploy-ocs-cluster-prod/5154/console Moving back to ASSIGNED, based on Coady's input from the above comment as well as an offline discussion I had with Subham Not a 4.11.0 blocker, moving it out moving to Modified PR merged downstream yesterday. Any info on the above error? Parth could look at the error. Thanks! `execErr.stderr.decode("utf-8")` would not be present for subprocess in python2 so we need to change it accordingly,
I see it was changed from exec to execErr earlier but seems not working still https://github.com/rook/rook/pull/8623
Will raise a PR for it, or arun if you any immediate response to it you can proceed.
Hi Parth, nothing much to add. Please go ahead with your change, will review the PR. Thanks, Arun removing my need info, @paarora feel free to open a pr. Thanks Update: ======== Failed with the same error which was mentioned in comment #22 ODF operator: ocs-registry:4.12.0-167 2023-01-23 22:34:25 17:04:24 - MainThread - ocs_ci.utility.connection - INFO - Executing cmd: python /tmp/external-cluster-details-exporter-zaa_ifvb.py --rbd-data-pool-name rbd --rgw-endpoint 10.0.210.136:8080 on 10.0.210.160 2023-01-23 22:34:26 17:04:26 - MainThread - ocs_ci.deployment.helpers.external_cluster_helpers - ERROR - Failed to run /tmp/external-cluster-details-exporter-zaa_ifvb.py with parameters --rbd-data-pool-name rbd --rgw-endpoint 10.0.210.136:8080. Error: Traceback (most recent call last): 2023-01-23 22:34:26 File "/tmp/external-cluster-details-exporter-zaa_ifvb.py", line 1682, in <module> 2023-01-23 22:34:26 rjObj.main() 2023-01-23 22:34:26 File "/tmp/external-cluster-details-exporter-zaa_ifvb.py", line 1662, in main 2023-01-23 22:34:26 generated_output = self.gen_json_out() 2023-01-23 22:34:26 File "/tmp/external-cluster-details-exporter-zaa_ifvb.py", line 1387, in gen_json_out 2023-01-23 22:34:26 self._gen_output_map() 2023-01-23 22:34:26 File "/tmp/external-cluster-details-exporter-zaa_ifvb.py", line 1370, in _gen_output_map 2023-01-23 22:34:26 ) = self.create_rgw_admin_ops_user() 2023-01-23 22:34:26 File "/tmp/external-cluster-details-exporter-zaa_ifvb.py", line 1155, in create_rgw_admin_ops_user 2023-01-23 22:34:26 in execErr.stderr.decode("utf-8") 2023-01-23 22:34:26 AttributeError: 'CalledProcessError' object has no attribute 'stderr' job link: https://url.corp.redhat.com/6455dab must gather: https://url.corp.redhat.com/f30c6af Fixed by PR: https://github.com/red-hat-storage/rook/pull/445 (In reply to Martin Bukatovic from comment #3) > (In reply to Subham Rai from comment #2) > > one question, since python 2.x is EOL, till when we are planning to support > > python 2.x? > > The documentation states that one should use python3, with an exception of > rhel7: > > > 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. So only cluster 4.11 and below would be only affected, as the 4.12 cluster would be using RHEL 8.x. Then no need to fix & test it on the 4.12 cluster, right? Per previous comment, moving back to consider for 4.11 and older Travis any plans when are going to take this in https://github.com/red-hat-storage/rook/pull/446 And Bipin probably it is good to backport to 4.10 too as it also supports (RHEL 7.x) no info required, since Parth already create bp pr. |