Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

mon,mgr: remove single wildcard '*' from ceph comand line description #21139

Merged
merged 1 commit into from Apr 24, 2018

Conversation

guzhongyan
Copy link
Contributor

because wildcard doesn't work.The '*' is consumed and
translated to current dir/file name before passing to ceph.

remove it from CLI description.

Signed-off-by: Gu Zhongyan guzhongyan@360.cn

because wildcard doesn't work.The '*' is consumed and
translated to current dir/file name before passing to ceph.

remove it from CLI description.

Signed-off-by: Gu Zhongyan <guzhongyan@360.cn>
@guzhongyan
Copy link
Contributor Author

take 'ceph osd in *' as an example:
$ ls
bin ceph.conf CMakeFiles compile_commands.json dev dpdk-ext-prefix include lib man mgr_gdb_tmp.sh mgr_tmp.output out src user-config.jam
boost CMakeCache.txt cmake_install.cmake CTestTestfile.cmake doc etc keyring Makefile mgr_gdb.sh mgr.output nohup.out spdk-ext-prefix systemd

$bin/ceph osd in * --verbose
*** DEVELOPER MODE: setting PATH, PYTHONPATH and LD_LIBRARY_PATH ***
parsed_args: Namespace(admin_socket=None, block=False, cephconf=None, client_id=None, client_name=None, cluster=None, cluster_timeout=None, completion=False, help=False, input_file=None, output_fi
le=None, output_format=None, status=False, verbose=True, version=False, watch=False, watch_channel='cluster', watch_debug=False, watch_error=False, watch_info=False, watch_sec=False, watch_warn=False), childargs: ['osd', 'in', 'bin', 'boost', 'ceph.conf', 'CMakeCache.txt', 'CMakeFiles', 'cmake_install.cmake', 'compile_commands.json', 'CTestTestfile.cmake', 'dev', 'doc', 'dpdk-ext-prefix', 'etc', 'include', 'keyring', 'lib', 'Makefile', 'man', 'mgr_gdb.sh', 'mgr_gdb_tmp.sh', 'mgr.output', 'mgr_tmp.output', 'nohup.out', 'out', 'spdk-ext-prefix', 'src', 'systemd', 'user-config.jam']

we can see childdargs are parsed as following:
childargs: ['osd', 'in', 'bin', 'boost', 'ceph.conf', 'CMakeCache.txt', 'CMakeFiles', 'cmake_install.cmake', 'compile_commands.json', 'CTestTestfile.cmake', 'dev', 'doc', 'dpdk-ext-prefix', 'etc', 'include', 'keyring', 'lib', 'Makefile', 'man', 'mgr_gdb.sh', 'mgr_gdb_tmp.sh', 'mgr.output', 'mgr_tmp.output', 'nohup.out', 'out', 'spdk-ext-prefix', 'src', 'systemd', 'user-config.jam']

@guzhongyan
Copy link
Contributor Author

guzhongyan commented Mar 30, 2018

I kept the *.cc code logic unchanged, such as:

      // wildcard?
      if (j == 0 &&
          (idvec[0] == "any" || idvec[0] == "all" || idvec[0] == "*")) {

not sure if they should also be cleaned up.

@jcsp
Copy link
Contributor

jcsp commented Mar 30, 2018

The "*" works fine if the user quotes it, but I agree that those versions are pretty bad for usability and redundant when we also have "all", so 👍

@tchaikov
Copy link
Contributor

tchaikov commented Mar 30, 2018

probably we can mark * argument deprecated in the PendingReleaseNotes, and remove the * handling code in .cc file in the next release.

@tchaikov tchaikov requested a review from jecluis March 30, 2018 15:12
@jcsp jcsp added this to the mimic milestone Apr 23, 2018
@jcsp
Copy link
Contributor

jcsp commented Apr 23, 2018

Adding mimic milestone: this one is only changing doc strings but let's let it go through testing anyway.

@jcsp jcsp added the needs-qa label Apr 23, 2018
@jcsp
Copy link
Contributor

jcsp commented Apr 23, 2018

retest this please (jenkins)

@jcsp
Copy link
Contributor

jcsp commented Apr 24, 2018

Tested here: http://pulpito.ceph.com/jspray-2018-04-24_01:06:58-rados:mgr-wip-jcsp-testing-20180423-distro-basic-smithi/

All failures are the MDS_ALL_DOWN log message thing addressed elsewhere

@jcsp jcsp merged commit 8c59d02 into ceph:master Apr 24, 2018
@guzhongyan guzhongyan deleted the cmd-wildcard branch April 25, 2018 04:21
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
4 participants