Skip to content

Commit

Permalink
fix error : ceph pg ls 0
Browse files Browse the repository at this point in the history
no valid command found; 10 closest matches:
pg ls-by-primary <osdname (id|osd.id)> {<int>} {active|clean|down|replay|splitting|scrubbing|scrubq|degraded|inconsistent|peering|repair|recovery|backfill_wait|incomplete|stale|remapped|deep_scrub|backfill|backfill_toofull|recovery_wait|undersized [active|clean|down|replay|splitting|scrubbing|scrubq|degraded|inconsistent|peering|repair|recovery|backfill_wait|incomplete|stale|remapped|deep_scrub|backfill|backfill_toofull|recovery_wait|undersized...]}
Error EINVAL: invalid command

this is due to partial compare of prefix

Signed-off-by: xinxin shu <[email protected]>
  • Loading branch information
xinxin shu committed Feb 10, 2015
1 parent 4be91c6 commit f814262
Showing 1 changed file with 4 additions and 1 deletion.
5 changes: 4 additions & 1 deletion src/pybind/ceph_argparse.py
Original file line number Diff line number Diff line change
Expand Up @@ -727,7 +727,10 @@ def matchnum(args, signature, partial=False):
word = words.pop(0)

try:
validate_one(word, desc, partial)
# only allow partial matching if we're on the last supplied
# word; avoid matching foo bar and foot bar just because
# partial is set
validate_one(word, desc, partial and (len(words) == 0))
valid = True
except ArgumentError:
# matchnum doesn't care about type of error
Expand Down

0 comments on commit f814262

Please sign in to comment.