Description of problem: root@master:~# ceph osd tell "osd tell" is deprecated; try "tell osd.<id>" instead (id can be "*") root@master:~# ceph tell osd.* Cannot use 'tell' with interactive mode root@master:~# Expected results: I am not in interactive mode!
probably need a bug upstream
just for context: Ceph odd tell is one of the "top ten" commands to try in Ceph Wiki, in Red Hat blogs, etc. That's where the path starts, then you hit the first error message, then you try to follow the hint... and then you fail again.
posted upstream at tracker.cep.com (interestingly numbered issue 11101): http://tracker.ceph.com/issues/11101
Looks like this is still unresolved upstream. Re-targeting to 2.0 in the meantime; please feel free to re-target if necessary
this is just an error message correction. let's fix it instead of dragging the bug on for multiple releases :)
Kefu, do you mind taking this one, or re-assigning as appropriate?
pending on review: https://github.com/ceph/ceph/pull/5249
Thanks Kefu!
Patches to cherry-pick downstream: https://github.com/ceph/ceph/pull/5371/commits
Tested the fix and observed following: -------------------------------------------------------- "ceph osd tell" now prints proper message. Following the contents of the message leads to successful execution of the commands [cephuser@admin ~]$ sudo ceph osd tell "osd tell" is deprecated; try "tell osd.<id> <command> [options...]" instead (id can be "*") [cephuser@admin ~]$ sudo ceph tell osd.4 bench 1024 4096 { "bytes_written": 1024, "blocksize": 4096, "bytes_per_sec": 52807.000000 } -------------------------------------------------------- [cephuser@admin ~]$ sudo ceph tell Cannot use 'tell' with interactive mode. For an interactive shell, please start "/bin/ceph" without non-option arguments. Shouldn't the above error message be "Cannot use 'tell' with non-interactive mode. For an interactive shell, please start "/bin/ceph" without non-option arguments."? /bin/ceph actually opens interactive shell whereas just 'ceph <options/commands>' leads to non-interactive mode. Please correct me if I am wrong.
(In reply to Harish NV Rao from comment #12) > [cephuser@admin ~]$ sudo ceph tell > Cannot use 'tell' with interactive mode. For an interactive shell, please > start "/bin/ceph" without non-option arguments. > > Shouldn't the above error message be "Cannot use 'tell' with non-interactive > mode. For an interactive shell, please start "/bin/ceph" without non-option > arguments."? /bin/ceph actually opens interactive shell whereas just 'ceph > <options/commands>' leads to non-interactive mode. Please correct me if I am > wrong. Maybe we should alter the error text further to make this clearer? Change "Cannot use 'tell' with interactive mode" to "Ceph 'tell' requires additional arguments, or interactive mode" ... ? What do you think Kefu and Harish?
Hi Ken, We need to change the message something like this: "Ceph 'tell' requires additional arguments. <print usage for tell command>" As per David, tell command is not supported in the interactive mode. if used in interactive mode, pull request 6329 will take care of handling it. Regards, Harish
(additional ceph.in changes needed, re-targeting to RHCS 1.3.2)
Harish, Ken: i reopened the upstream ticket, and post an updated fix at https://github.com/ceph/ceph/pull/7106. could you help review it? thanks.
Kefu, Message looks good to me. Does the code change cover all of the following scenarios? 1) sudo ceph tell 2) sudo ceph tell mon.<id> # Don't provide any other arguments after mon.<id> 3) sudo ceph tell osd.<id> # Don't provide any other arguments after osd.<id> Also, will the pull request 6329 be part of 1.3.2? Regards, Harish
merged upstream in master, pending backport.
This is ready to go into 1.3.2 - re-targeting for that release.
The fix is working for below mentioned scenarios. [cephuser@magna003 ~]$ sudo ceph osd tell "osd tell" is deprecated; try "tell osd.<id> <command> [options...]" instead (id can be "*") [cephuser@magna003 ~]$ sudo ceph tell osd.* "/bin/ceph tell" requires additional arguments. Try "/bin/ceph tell <name> <command> [options...]" instead. [cephuser@magna003 ~]$ sudo ceph tell "/bin/ceph tell" requires additional arguments. Try "/bin/ceph tell <name> <command> [options...]" instead. [cephuser@magna003 ~]$ sudo ceph tell mon.* "/bin/ceph tell" requires additional arguments. Try "/bin/ceph tell <name> <command> [options...]" instead. [cephuser@magna003 ~]$ sudo ceph tell osd.3 "/bin/ceph tell" requires additional arguments. Try "/bin/ceph tell <name> <command> [options...]" instead. [cephuser@magna003 ~]$ sudo ceph tell osd.4 bench { "bytes_written": 1073741824, "blocksize": 4194304, "bytes_per_sec": 53981114.000000 } It's failing when tell command is used in ceph interactive shell. As per https://github.com/ceph/ceph/pull/6329, using 'tell' in interactive mode should have resulted in error message "Can not use 'tell' in interactive mode". [cephuser@magna003 ~]$ sudo ceph ceph> tell Invalid command: missing required parameter target(<name (type.id)>) tell <name (type.id)> <args> [<args>...] : send a command to a specific daemon Invalid command ceph> tell osd.4 bench 1024 4096 Error: 22 EINVAL Status: unrecognized command! [{"prefix": "tell", "args": ["bench", "1024", "4096"]}] ceph> Looks like the pr 6329 is not included in latest build. Moving the BZ to assigned state.
You're right Harish, we missed this one.
David, in Comment #28 Harish describes how your PR 6329 fixes an issue with "ceph tell" in interactive mode. Would you please open a Redmine ticket upstream to track fixing this in Hammer, and then cherry-pick the necessary changes to a wip branch for inclusion in hammer?
Created upstream tracker of backport to hammer: http://tracker.ceph.com/issues/14769 Created pull request: https://github.com/ceph/ceph/pull/7656
This bug was accidentally moved from POST to MODIFIED via an error in automation, please see mmccune with any questions
Fix is working for interactive mode. (Interactive mode) ceph>tell mon.1 Can not use 'tell' in interactive mode. ceph> tell Can not use 'tell' in interactive mode. ceph> tell osd.* Can not use 'tell' in interactive mode. (Non-interactive mode) $ sudo ceph tell osd.4 bench { "bytes_written": 1073741824, "blocksize": 4194304, "bytes_per_sec": 60039561.000000 } $ sudo ceph tell mon.* "/usr/bin/ceph tell" requires additional arguments. Try "/usr/bin/ceph tell <name> <command> [options...]" instead.
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://rhn.redhat.com/errata/RHSA-2016-1972.html