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 <xinxin.shu@intel.com>
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