]> git-server-git.apps.pok.os.sepia.ceph.com Git - ceph.git/commit
osd/command tell: check pgid at the right time 11547/head
authorJaveme <javaloveme@gmail.com>
Wed, 19 Oct 2016 05:51:29 +0000 (13:51 +0800)
committerJaveme <javaloveme@gmail.com>
Fri, 21 Oct 2016 10:23:56 +0000 (18:23 +0800)
commitef14b7b760a4adfd7b0f3fe13b12658f3f2a739f
tree5bd5db646f8abade8ece8e46d4cc69c91338cc61
parent78f298df0541a894a0a4314c11495272ea910b8b
osd/command tell: check pgid at the right time

Run a command: "ceph tell osd.0 query", and it outputs the following
error message:
  Error EINVAL: unrecognized command! [{"prefix": "query"}]

In fact, the command "query" exists, but it requires one more input
parameter "pgid", therefore the following error information will be
more appropriate:
  Error EINVAL: no pgid specified

In this patch, we check the parameter pgid after recognizing a command
(like "query" or "list_missing"), rather than before it.

Signed-off-by: Javeme <javaloveme@gmail.com>
src/osd/OSD.cc