Bug 1997964

Summary: [GSS][cephadm][Testathon] Running "cephadm shell --no-hosts" gives error: unrecognized arguments: --no-hosts
Product: [Red Hat Storage] Red Hat Ceph Storage Reporter: Karun Josy <kjosy>
Component: CephadmAssignee: Adam King <adking>
Status: CLOSED ERRATA QA Contact: Sunil Kumar Nagaraju <sunnagar>
Severity: medium Docs Contact:
Priority: low    
Version: 5.0CC: agunn, rlepaksh, sunnagar, vereddy
Target Milestone: ---   
Target Release: 5.1   
Hardware: All   
OS: Linux   
Whiteboard:
Fixed In Version: ceph-16.2.6-1.el8cp Doc Type: If docs needed, set a value
Doc Text:
Story Points: ---
Clone Of: Environment:
Last Closed: 2022-04-04 10:21:20 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 Karun Josy 2021-08-26 07:41:50 UTC
* Description of problem:

When we try to add a host and if it fails, then we display an output similar to :

-----------------------------
[ceph: root@vm501 /]# ceph orch host add vm502
Error EINVAL: Cannot resolve ip for host vm502: [Errno -2] Name or service not known
You may need to supply an address for vm502

Please make sure that the host is reachable and accepts connections using the cephadm SSH key
To add the cephadm SSH key to the host:
> ceph cephadm get-pub-key > ~/ceph.pub
> ssh-copy-id -f -i ~/ceph.pub root@vm502


*********
To check that the host is reachable open a new shell with the --no-hosts flag:
> cephadm shell --no-hosts
*********

Then run the following:
> ceph cephadm get-ssh-config > ssh_config
> ceph config-key get mgr/cephadm/ssh_identity_key > ~/cephadm_private_key
> chmod 0600 ~/cephadm_private_key
> ssh -F ssh_config -i ~/cephadm_private_key root@vm502
-----------------------------



On running #cephadm shell --no-hosts it gives :
cephadm: error: unrecognized arguments: --no-hosts


Is this argument not available? If no, then we need to correct the output message to include the correct argument. 



* Version-Release number of selected component (if applicable):
RHCS 5

* How reproducible:
Always

* Steps to Reproduce:
1. Try to add a host which will result in failing
2. The error message displays to run  #cephadm shell --no-hosts
3. Running  #cephadm shell --no-hosts would show unrecognized arguments: --no-hosts

Comment 1 Sebastian Wagner 2021-08-26 08:43:25 UTC
https://github.com/ceph/ceph/pull/40924 did not went into downstream. This is already in 5.1

Comment 8 errata-xmlrpc 2022-04-04 10:21:20 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 Ceph Storage 5.1 Security, Enhancement, 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-2022:1174