Bug 2124871 - "ceph-external-cluster-details-exporter.py" ( 4.11 ) failed to run on RHCS 4.3 cluster
Summary: "ceph-external-cluster-details-exporter.py" ( 4.11 ) failed to run on RHCS 4....
Keywords:
Status: CLOSED CURRENTRELEASE
Alias: None
Product: Red Hat OpenShift Data Foundation
Classification: Red Hat Storage
Component: rook
Version: 4.11
Hardware: Unspecified
OS: Unspecified
unspecified
medium
Target Milestone: ---
: ODF 4.12.0
Assignee: Parth Arora
QA Contact: Neha Berry
URL:
Whiteboard:
Depends On:
Blocks: 2130110 2130111
TreeView+ depends on / blocked
 
Reported: 2022-09-07 10:34 UTC by Vijay Avuthu
Modified: 2023-08-09 17:03 UTC (History)
6 users (show)

Fixed In Version:
Doc Type: No Doc Update
Doc Text:
Clone Of:
: 2130110 2130111 (view as bug list)
Environment:
Last Closed: 2023-02-08 14:06:28 UTC
Embargoed:
tnielsen: needinfo? (vavuthu)
paarora: needinfo-


Attachments (Terms of Use)


Links
System ID Private Priority Status Summary Last Updated
Github red-hat-storage rook pull 416 0 None open Bug 2124871: external: do not add info=read cap if ceph version doesn't support it 2022-09-22 09:24:14 UTC
Github rook rook pull 10931 0 None open external: do not add info=read cap if ceph version doesn't support it 2022-09-12 15:10:49 UTC

Description Vijay Avuthu 2022-09-07 10:34:36 UTC
Description of problem (please be detailed as possible and provide log
snippests):

openshift installer (4.11.0-0.nightly-2022-09-02-184920)

ODF 4.11 GA'ed

external cluster: RHCS 4.3 ( ceph version 14.2.22-125.el8cp )

Version of all relevant components (if applicable):


Does this issue impact your ability to continue to work with the product
(please explain in detail what is the user impact)?

not able to run external script

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?
Not tried

If this is a regression, please provide more details to justify this:


Steps to Reproduce:
1. install odf using ocs-ci ( external mode )
2. run exporter script on external RHCS cluster
3.


Actual results:

2022-09-05 20:30:08  15:00:07 - MainThread - ocs_ci.utility.connection - INFO  - Executing cmd: python3 /tmp/external-cluster-details-exporter-lagtweoi.py --rbd-data-pool-name rbd --rgw-endpoint 10.x.xxx.xx:8080 on 10.x.xxx.xx
2022-09-05 20:30:08  15:00:08 - MainThread - ocs_ci.deployment.helpers.external_cluster_helpers - ERROR  - Failed to run /tmp/external-cluster-details-exporter-lagtweoi.py with parameters --rbd-data-pool-name rbd --rgw-endpoint 10.x.xxx.xx:8080. Error: Traceback (most recent call last):
2022-09-05 20:30:08    File "/tmp/external-cluster-details-exporter-lagtweoi.py", line 1094, in create_rgw_admin_ops_user
2022-09-05 20:30:08      output = subprocess.check_output(cmd, stderr=subprocess.PIPE)
2022-09-05 20:30:08    File "/usr/lib64/python3.6/subprocess.py", line 356, in check_output
2022-09-05 20:30:08      **kwargs).stdout
2022-09-05 20:30:08    File "/usr/lib64/python3.6/subprocess.py", line 438, in run
2022-09-05 20:30:08      output=stdout, stderr=stderr)
2022-09-05 20:30:08  subprocess.CalledProcessError: Command '['radosgw-admin', 'user', 'create', '--uid', 'rgw-admin-ops-user', '--display-name', 'Rook RGW Admin Ops user', '--caps', 'info=read;buckets=*;users=*;usage=read;metadata=read;zone=read']' returned non-zero exit status 244.
2022-09-05 20:30:08  
2022-09-05 20:30:08  During handling of the above exception, another exception occurred:
2022-09-05 20:30:08  
2022-09-05 20:30:08  Traceback (most recent call last):
2022-09-05 20:30:08    File "/tmp/external-cluster-details-exporter-lagtweoi.py", line 1578, in <module>
2022-09-05 20:30:08      rjObj.main()
2022-09-05 20:30:08    File "/tmp/external-cluster-details-exporter-lagtweoi.py", line 1558, in main
2022-09-05 20:30:08      generated_output = self.gen_json_out()
2022-09-05 20:30:08    File "/tmp/external-cluster-details-exporter-lagtweoi.py", line 1333, in gen_json_out
2022-09-05 20:30:08      self._gen_output_map()
2022-09-05 20:30:08    File "/tmp/external-cluster-details-exporter-lagtweoi.py", line 1316, in _gen_output_map
2022-09-05 20:30:08      ) = self.create_rgw_admin_ops_user()
2022-09-05 20:30:08    File "/tmp/external-cluster-details-exporter-lagtweoi.py", line 1118, in create_rgw_admin_ops_user
2022-09-05 20:30:08      raise Exception(err_msg)
2022-09-05 20:30:08  Exception: failed to execute command ['radosgw-admin', 'user', 'create', '--uid', 'rgw-admin-ops-user', '--display-name', 'Rook RGW Admin Ops user', '--caps', 'info=read;buckets=*;users=*;usage=read;metadata=read;zone=read']. Output: b''. Code: 244. Error: b'could not create user: unable to create user, unable to add user capabilities, unable to add caps: info=read;buckets=*;users=*;usage=read;metadata=read;zone=read\n'


Expected results:

exporter script should run without any issues

Additional info:

looks like info capabilitie are not supported in 4.x version.
https://access.redhat.com/documentation/en-us/red_hat_ceph_storage/4/html/object_gateway_configuration_and_administration_guide/rgw-administration-rgw#usr-mgmt-add-remove-admin-capabilities-rgw

strangely same script is working on RHCS 4.1 version 

job: https://url.corp.redhat.com/e63c521

Comment 6 Parth Arora 2022-09-08 10:17:27 UTC
PR which fixes the above problem https://github.com/rook/rook/pull/10931


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