Bug 1819667

Summary: some "ceph mds" sub commands returns error message "no valid command found"
Product: [Red Hat Storage] Red Hat Ceph Storage Reporter: Osama Elswah <oelswah>
Component: CephFSAssignee: Kotresh HR <khiremat>
Status: CLOSED ERRATA QA Contact: subhash <vpoliset>
Severity: low Docs Contact:
Priority: low    
Version: 4.0CC: ceph-eng-bugs, gfarnum, hyelloji, pdonnell, sweil, tserlin, vereddy
Target Milestone: z1   
Target Release: 4.1   
Hardware: x86_64   
OS: Linux   
Whiteboard:
Fixed In Version: ceph-14.2.8-66.el8cp, ceph-14.2.8-68.el7cp Doc Type: If docs needed, set a value
Doc Text:
Story Points: ---
Clone Of: Environment:
Last Closed: 2020-07-20 14:21:03 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 Osama Elswah 2020-04-01 09:41:48 UTC
Description of problem:
some "ceph mds" sub commands returns error message "no valid command found"
Examples: 
1) ceph mds newfs
2) ceph mds add_data_pool

Version-Release number of selected component (if applicable):
ceph version 14.2.4-125.el8cp

Steps to Reproduce:
1) Create fs
2) On client try to issue the aforementioned commands

Actual results:
no valid command found;

Comment 1 Kotresh HR 2020-04-14 12:07:17 UTC
Hi Osama,

The mds sub commands mentioned are deprecated. Please check below.

mds newfs # replaced by "fs new"
mds add_data_pool # replaced by "fs add_data_pool"

Please try the new sub commands and close the bug if it's working for you.

Thanks
Kotresh

Comment 2 Osama Elswah 2020-04-14 12:14:06 UTC
Hi Kotresh,

then the product documentation is wrong for RHCS 4

https://access.redhat.com/documentation/en-us/red_hat_ceph_storage/4/html/file_system_guide/administering-the-ceph-file-systems#adding-data-pools 

It states:  
### 
Add the newly created pool under the control of the Metadata Servers.

ceph mds add_data_pool <name>
####

Also auto complete suggests these sub commands. 

Regards
Osama

Comment 3 Kotresh HR 2020-04-16 07:53:12 UTC
Hi Osama,

Would you please confirm the new commands ('fs new' and 'fs add_data_pool') are working?
If so, we should be converting this to a doc bug to fix the documentation.

I don't see auto complete suggestions in my setup. Have you enabled it specifically?

Thanks,
Kotresh

Comment 4 Osama Elswah 2020-04-16 08:12:47 UTC
Hi Kotresh, 

I didn't set up any special configuration for auto complete, I just have the bash-completion package installed

[root@cli01 ~]# rpm -qa | grep comple
bash-completion-2.7-5.el8.noarch

You can see for example the "add_data_pool" being suggested:
[root@cli01 ~]# ceph mds 
add_data_pool     deactivate        metadata          rm                set_state         
cluster_down      dump              newfs             rm_data_pool      stat              
cluster_up        fail              ok-to-stop        rmfailed          stop              
compat            freeze            remove_data_pool  set               tell              
count-metadata    getmap            repaired          set_max_mds       versions   

Even when I type it, the command is explained:
[root@cli01 ~]# ceph mds add_data_pool 
                       #add data pool <pool>  

But when I enter the command, I get the error
[root@cli01 ~]# ceph mds add_data_pool 
no valid command found; 10 closest matches:
mds metadata {<who>}
mds count-metadata <property>

Regards,
Osama

Comment 5 Kotresh HR 2020-04-16 10:04:58 UTC
Ok, got it. I think that needs a fix in bash completion script.

Comment 6 Osama Elswah 2020-04-17 10:34:11 UTC
Hi Kotresh, 
the commands that you suggested in your first reply worked. 
Thanks for your support. 

Regards,
Osama

Comment 14 Veera Raghava Reddy 2020-07-04 17:11:33 UTC
ceph mds bashauto-complete does not show ceph mds auto_data_pool

[root@extensa003 ~]# ceph mds
no valid command found; 10 closest matches:
mds count-metadata <property>
mds metadata {<who>}
mds repaired <role>
mds fail <role_or_gid>
mds rm <int[0-]>
mds compat rm_incompat <int[0-]>
mds compat rm_compat <int[0-]>
mds versions
mds compat show
mds ok-to-stop <ids> [<ids>...]
Error EINVAL: invalid command
[root@extensa003 ~]#

Comment 16 errata-xmlrpc 2020-07-20 14:21:03 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, 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-2020:3003