Bug 2224313

Summary: [cee/sd][doc]Need to correct the examples for "cephadm add-repo"
Product: [Red Hat Storage] Red Hat Ceph Storage Reporter: Geo Jose <gjose>
Component: DocumentationAssignee: Ranjini M N <rmandyam>
Documentation sub component: Install Guide QA Contact: Manisha Saini <msaini>
Status: NEW --- Docs Contact: Anjana Suparna Sriram <asriram>
Severity: medium    
Priority: unspecified CC: rmandyam
Version: 5.3   
Target Milestone: ---   
Target Release: 6.1z3   
Hardware: x86_64   
OS: Linux   
Whiteboard:
Fixed In Version: Doc Type: If docs needed, set a value
Doc Text:
Story Points: ---
Clone Of: Environment:
Last Closed: 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 Geo Jose 2023-07-20 11:33:21 UTC
Describe the issue:
------------------
While following the documentation, unable to perform "cephadm add-repo". So, needs correction in the examples for "cephadm add-repo"
 
Document URL:
------------
- RHCS 5: https://access.redhat.com/documentation/en-us/red_hat_ceph_storage/5/html/installation_guide/the-cephadm-commands_install
- RHCS 6: https://access.redhat.com/documentation/en-us/red_hat_ceph_storage/6/html/installation_guide/the-cephadm-commands_install#doc-wrapper

Chapter/Section Number and Title:
---------------------------------
- Appendix B. The cephadm commands

Product Version:
---------------
- RHCS 5,6

Any other versions of this document that also needs this update:
---------------------------------------------------------------
- RHCS 5,6

Comment 1 Geo Jose 2023-07-20 11:37:54 UTC

Additional information:
-----------------------

- While following the instruction, its trying to use EPEL repository and getting failed with the below error:
~~~
[root@01-87-05-node1 ~]# cephadm add-repo --version 16.2.10
Writing repo to /etc/yum.repos.d/ceph.repo...
Enabling EPEL...
Non-zero exit code 1 from yum install -y epel-release
yum: stdout Updating Subscription Management repositories.
yum: stdout Ceph x86_64                                      27 kB/s |  75 kB     00:02
yum: stdout Ceph noarch                                     6.5 kB/s |  15 kB     00:02
yum: stdout Ceph SRPMS                                      827  B/s | 1.7 kB     00:02
yum: stdout Red Hat Ceph Storage Tools 5 for RHEL 8 x86_64  8.1 kB/s | 3.8 kB     00:00
yum: stdout Red Hat Ceph Storage Tools 5 for RHEL 8 x86_64  343 kB/s | 402 kB     00:01
yum: stdout Red Hat Enterprise Linux 8 for x86_64 - BaseOS   11 kB/s | 4.1 kB     00:00
yum: stdout Red Hat Enterprise Linux 8 for x86_64 - BaseOS   21 MB/s |  62 MB     00:03
yum: stdout Red Hat Ansible Engine 2.9 for RHEL 8 x86_64 (R  10 kB/s | 4.0 kB     00:00
yum: stdout Red Hat Enterprise Linux 8 for x86_64 - AppStre  13 kB/s | 4.5 kB     00:00
yum: stdout Red Hat Enterprise Linux 8 for x86_64 - AppStre  15 MB/s |  58 MB     00:03
yum: stdout No match for argument: epel-release
yum: stderr Error: Unable to find a match: epel-release
Traceback (most recent call last):
  File "/usr/sbin/cephadm", line 9217, in <module>
    main()
  File "/usr/sbin/cephadm", line 9205, in main
    r = ctx.func(ctx)
  File "/usr/sbin/cephadm", line 7073, in command_add_repo
    pkg.add_repo()
  File "/usr/sbin/cephadm", line 6922, in add_repo
    call_throws(self.ctx, [self.tool, 'install', '-y', 'epel-release'])
  File "/usr/sbin/cephadm", line 1636, in call_throws
    raise RuntimeError(f'Failed command: {" ".join(command)}: {s}')
RuntimeError: Failed command: yum install -y epel-release: Error: Unable to find a match: epel-release

[root@01-87-05-node1 ~]#
[root@01-87-05-node1 ~]# cephadm add-repo --release pacific
Writing repo to /etc/yum.repos.d/ceph.repo...
Enabling EPEL...
Non-zero exit code 1 from yum install -y epel-release
yum: stdout Updating Subscription Management repositories.
yum: stdout Ceph x86_64                                      27 kB/s |  77 kB     00:02
yum: stdout Ceph noarch                                     6.6 kB/s |  15 kB     00:02
yum: stdout Ceph SRPMS                                      835  B/s | 1.7 kB     00:02
yum: stdout No match for argument: epel-release
yum: stderr Error: Unable to find a match: epel-release
Traceback (most recent call last):
  File "/usr/sbin/cephadm", line 9217, in <module>
    main()
  File "/usr/sbin/cephadm", line 9205, in main
    r = ctx.func(ctx)
  File "/usr/sbin/cephadm", line 7073, in command_add_repo
    pkg.add_repo()
  File "/usr/sbin/cephadm", line 6922, in add_repo
    call_throws(self.ctx, [self.tool, 'install', '-y', 'epel-release'])
  File "/usr/sbin/cephadm", line 1636, in call_throws
    raise RuntimeError(f'Failed command: {" ".join(command)}: {s}')
RuntimeError: Failed command: yum install -y epel-release: Error: Unable to find a match: epel-release

[root@01-87-05-node1 ~]#
~~~


Suggestions for improvement:
---------------------------
- Check with engineering/QE team and confirm whether these options are applicable for downstream. If this is applicable for downstream, give correct example for downstream(disconnected environment).